Get all members (descendants) of a given rank level

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

Arguments

name

taxonomic scientific name (e.g. "Aves")

rank

taxonomic rank name. (e.g. "class")

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.

See also

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

Examples

# \donttest{ # \dontshow{ ## All examples use a temporary directory Sys.setenv(TAXADB_HOME=tempdir()) # } filter_rank("Aves", "class")
#> # A tibble: 13,069 x 17 #> sort taxonID scientificName taxonRank acceptedNameUsa… taxonomicStatus #> <int> <chr> <chr> <chr> <chr> <chr> #> 1 1 ITIS:9… Hemignathus h… species ITIS:997971 accepted #> 2 1 ITIS:9… Loxops wolste… species ITIS:997967 accepted #> 3 1 ITIS:9… Loxops ochrac… species ITIS:997966 accepted #> 4 1 ITIS:9… Spizelloides … species ITIS:997961 accepted #> 5 1 ITIS:9… Akialoa stejn… species ITIS:997881 accepted #> 6 1 ITIS:9… Akialoa lanai… species ITIS:997879 accepted #> 7 1 ITIS:9… Rhynchophanes… species ITIS:997873 accepted #> 8 1 ITIS:9… Spinus spines… species ITIS:997872 accepted #> 9 1 ITIS:9… Spinus crassi… species ITIS:997871 accepted #> 10 1 ITIS:9… Spinus uropyg… species ITIS:997870 accepted #> # … with 13,059 more rows, and 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>
# }