This function identifies records missing information on an event date (i.e., when a record was collected or observed).

bdc_eventDate_empty(data, eventDate = "eventDate")

Arguments

data

A data frame containing column with event date information.

eventDate

Numeric or date. The column with event date information.

Value

A data.frame containing the column ".eventDate_empty". Compliant (TRUE) if 'eventDate' is not empty; otherwise "FALSE".

Details

This test identifies records missing event date information (i.e., empty or not applicable NA).

See also

Examples

collection_date <- c(
  NA, "31/12/2015", "2013-06-13T00:00:00Z", "2013-06-20",
  "", "2013", "0001-01-00"
)
x <- data.frame(collection_date)

bdc_eventDate_empty(data = x, eventDate = "collection_date")
#> 
#> bdc_eventDate_empty:
#> Flagged 2 records.
#> One column was added to the database.
#> # A tibble: 7 × 2
#>   collection_date        .eventDate_empty
#>   <chr>                  <lgl>           
#> 1  NA                    FALSE           
#> 2 "31/12/2015"           TRUE            
#> 3 "2013-06-13T00:00:00Z" TRUE            
#> 4 "2013-06-20"           TRUE            
#> 5 ""                     FALSE           
#> 6 "2013"                 TRUE            
#> 7 "0001-01-00"           TRUE