Flags records with empty or not interpretable scientific names.

bdc_scientificName_empty(data, sci_names = "scientificName")

Arguments

data

data.frame. Containing the species scientific names.

sci_names

character string. The column name with the species scientific name. Default = "scientificName".

Value

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

Details

This test identifies records missing scientific names (i.e., empty or not applicable NA names)

Examples

x <- data.frame(scientificName = c("Ocotea odorifera", NA, "Panthera onca", ""))
bdc_scientificName_empty(data = x, sci_names = "scientificName")
#> 
#> bdc_scientificName_empty:
#> Flagged 2 records.
#> One column was added to the database.
#> # A tibble: 4 × 2
#>   scientificName     .scientificName_empty
#>   <chr>              <lgl>                
#> 1 "Ocotea odorifera" TRUE                 
#> 2  NA                FALSE                
#> 3 "Panthera onca"    TRUE                 
#> 4 ""                 FALSE