R/bdc_filter_out_names.R
bdc_filter_out_names.Rd
This function is useful for selecting records according to their taxonomic status. By default, only records with accepted scientific names are returned.
bdc_filter_out_names(
data,
col_name = "notes",
taxonomic_status = "accepted",
opposite = FALSE
)
data.frame. Containing the column "notes" with information on the taxonomic status of scientific names.
character string. The column name containing notes about the taxonomic status of a name. Default = "notes".
character string. Taxonomic status of a name. Default = "accepted".
logical. Should taxonomic status different from those listed in 'taxonomic_status' be returned? Default = FALSE
A data.frame filtered out according to names listed in 'taxonomic_status'.
By default, only records with accepted scientific names are kept in
the database. Such records are listed in the column 'taxonomic_status' as
"accepted", "accepted | replaceSynonym", "accepted | wasMisspelled" or
"accepted | wasMisspelled | replaceSynonym". It is also possible to
customize the list of taxonomic notes to be kept in the argument
'taxonomic_status'. See 'notes' in the data.frame resulted from the function
bdc_create_report
. If 'opposite' is TRUE, records with notes
different from names listed in 'taxonomic_status' are returned.
Other taxonomy:
bdc_clean_names()
,
bdc_query_names_taxadb()
df_notes <-
data.frame(
notes = c(
"notFound", "accepted", "accepted | replaceSynonym",
"accepted | wasMisspelled",
"accepted | wasMisspelled | replaceSynonym",
"multipleAccepted",
"heterotypic synonym"
)
)
bdc_filter_out_names(
data = df_notes,
taxonomic_status = "accepted",
col_name = "notes",
opposite = FALSE
)
#> notes
#> 1 accepted
#> 2 accepted | replaceSynonym
#> 3 accepted | wasMisspelled
#> 4 accepted | wasMisspelled | replaceSynonym