list_higher_taxo: Get higher taxonomy data for list of names

View source: R/list_higher_taxo.R

list_higher_taxoR Documentation

Get higher taxonomy data for list of names

Description

Retrieve higher taxonomy information (like Family and Order) for each record from the "Encyclopedia of Life" web API.

Usage

list_higher_taxo(
  indf,
  canonical,
  genus = FALSE,
  verbose = FALSE,
  progress = TRUE
)

Arguments

indf

input data frame containing taxonomic list

canonical

field name containing scientific names

genus

If TRUE, use only genus level data to get taxonomy

verbose

If TRUE, displays each name string for which the higher taxonomy is sought

progress

If TRUE prints progress bar and messages on the console.

Details

This function makes use of certain functions in the taxize package. It scans and retrieves the taxonomic hierarchy for each scientific name (or just genus name) in the data set. When new data are retrieved, they are stored in a local sqlite database, taxo.db, for faster further access.

Value

data frame with added / updated columns

"Kingdom"

Kingdom of the Scientific name

"Phylum"

Phylum of the Scientific name

"Order_"

Order of the Scientific name

"Family"

Family of the Scientific name

"Genus"

Genus of the Scientific name

and also saves a local copy of taxonomy downloaded for future use in 'taxo.db' sqlite file

See Also

Other Name functions: build_gen_syn(), cast_canonical(), cast_scientificname(), check_scientific(), expand_name(), get_accepted_names(), guess_taxo_rank(), melt_canonical(), melt_scientificname(), resolve_names(), taxo_fuzzy_match()

Examples

## Not run: 
mylist <- data.frame("canonical" = c("Abrothrix longipilis",
                                    "Mus longipilis",
                                    "Abrothrix jelskii",
                                    "Cardinalis cardinalis",
                                    "Danaus plexippus"),
                    stringsAsFactors = FALSE)

my_taxo_list <- list_higher_taxo(mylist,"canonical")

## End(Not run)

taxotools documentation built on May 29, 2024, 3:09 a.m.