Look up taxonomic information by scientific name

filter_name(
  name,
  provider = getOption("taxadb_default_provider", "itis"),
  version = latest_version(),
  collect = TRUE,
  ignore_case = TRUE,
  db = td_connect()
)

Arguments

name

a character vector of scientific names, e.g. "Homo sapiens"

provider

from which provider should the hierarchy be returned? Default is 'itis', which can also be configured using options(default_taxadb_provider=..."). See [td_create] for a list of recognized providers.

version

Which version of the taxadb provider database should we use? defaults to latest. See available_versions for details.

collect

logical, default TRUE. Should we return an in-memory data.frame (default, usually the most convenient), or a reference to lazy-eval table on disk (useful for very large tables on which we may first perform subsequent filtering operations.)

ignore_case

should we ignore case (capitalization) in matching names? default is TRUE.

db

a connection to the taxadb database. See details.

Value

a data.frame in the Darwin Core tabular format containing the matching taxonomic entities.

Details

Most but not all authorities can match against both species level and higher-level (or lower, e.g. subspecies or variety) taxonomic names. The rank level is indicated by taxonRank column.

Most authorities include both known synonyms and accepted names in the scientificName column, (with the status indicated by taxonomicStatus). This is convenient, as users will typically not know if the names they have are synonyms or accepted names, but will want to get the match to the accepted name and accepted ID in either case.

See also

Other filter_by: filter_by(), filter_common(), filter_id(), filter_rank()

Examples

# \donttest{ # \dontshow{ ## All examples use a temporary directory Sys.setenv(TAXADB_HOME=tempdir()) # } sp <- c("Trochalopteron henrici gucenense", "Trochalopteron elliotii") filter_name(sp)
#> # A tibble: 3 x 17 #> sort taxonID scientificName taxonRank acceptedNameUsa… taxonomicStatus #> <int> <chr> <chr> <chr> <chr> <chr> #> 1 1 ITIS:9… Trochaloptero… subspeci… ITIS:916117 synonym #> 2 1 ITIS:9… Trochaloptero… subspeci… ITIS:916116 synonym #> 3 2 ITIS:9… Trochaloptero… species ITIS:916116 accepted #> # … with 11 more variables: update_date <chr>, kingdom <chr>, phylum <chr>, #> # class <chr>, order <chr>, family <chr>, genus <chr>, specificEpithet <chr>, #> # vernacularName <chr>, infraspecificEpithet <chr>, input <chr>
# }