bdc_filter_out_names {bdc}R Documentation

Filter out records according to their taxonomic status

Description

This function is useful for selecting records according to their taxonomic status. By default, only records with accepted scientific names are returned.

Usage

bdc_filter_out_names(
  data,
  col_name = "notes",
  taxonomic_status = "accepted",
  opposite = FALSE
)

Arguments

data

data.frame. Containing the column "notes" with information on the taxonomic status of scientific names.

col_name

character string. The column name containing notes about the taxonomic status of a name. Default = "notes".

taxonomic_status

character string. Taxonomic status of a name. Default = "accepted".

opposite

logical. Should taxonomic status different from those listed in 'taxonomic_status' be returned? Default = FALSE

Details

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.

Value

A data.frame filtered out according to names listed in 'taxonomic_status'.

See Also

Other taxonomy: bdc_clean_names(), bdc_query_names_taxadb()

Examples

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
)


[Package bdc version 1.1.4 Index]