taxadb (version 0.2.1)

filter_rank: Get all members (descendants) of a given rank level

Description

Get all members (descendants) of a given rank level

Usage

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

Value

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

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 tl_import 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? Can be significantly slower to run.

db

a connection to the taxadb database. See details.

See Also

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

Examples

Run this code
# \donttest{
  # \dontshow{
   ## All examples use a temporary directory
   Sys.setenv(TAXADB_HOME=file.path(tempdir(), "taxadb"))
   options("taxadb_default_provider"="itis_test")
  # }

filter_rank("Aves", "class")

# }

Run the code above in your browser using DataLab