Learn R Programming

taxize (version 0.9.4)

gbif_downstream: Retrieve all taxa names downstream in hierarchy for GBIF

Description

Retrieve all taxa names downstream in hierarchy for GBIF

Usage

gbif_downstream(key, downto, intermediate = FALSE, limit = 100,
  start = NULL, ...)

Arguments

key

A taxonomic serial number.

downto

The taxonomic level you want to go down to. See examples below. The taxonomic level IS case sensitive, and you do have to spell it correctly. See data(rank_ref) for spelling.

intermediate

(logical) If TRUE, return a list of length two with target taxon rank names, with additional list of data.frame's of intermediate taxonomic groups. Default: FALSE

limit

Number of records to return

start

Record number to start at

...

Further args passed on to gbif_name_usage

Value

data.frame of taxonomic information downstream to family from e.g., Order, Class, etc., or if intermediated=TRUE, list of length two, with target taxon rank names, and intermediate names.

Details

Sometimes records don't have a canonicalName entry which is what we look for. In that case we grab the scientificName entry. You can see the type of name colleceted in the column name_type

Examples

Run this code
# NOT RUN {
## the plant class Bangiophyceae
gbif_downstream(key = 198, downto="genus")
gbif_downstream(key = 198, downto="genus", intermediate=TRUE)

# families downstream from the family Strepsiptera (twisted wing parasites)
gbif_downstream(key = 1227, "family")
## here, intermediate leads to the same result as the target
gbif_downstream(key = 1227, "family", intermediate=TRUE)

# Lepidoptera
gbif_downstream(key = 797, "family")

# get species downstream from the genus Ursus
gbif_downstream(key = 2433406, "species")

# get tribes down from the family Apidae
gbif_downstream(key = 7799978, downto="species")
gbif_downstream(key = 7799978, downto="species", intermediate=TRUE)

# names that don't have canonicalname entries for some results
key <- get_gbifid("Myosotis")
res <- gbif_downstream(key, downto = "species")
res2 <- downstream(key, db = "gbif", downto = "species")
# }

Run the code above in your browser using DataLab