Prepare taxonomic data

tv_prep_names(x, col = NULL, names = NULL, db = NULL)

tv_prep_ids(x, col = NULL, ids = NULL, db = NULL)

Arguments

x

(data.frame) input data.frame or file path

col

(character) column name holding taxonomic names or taxonomic ids to use

names

(character) column name holding taxonomic names to use. if given, db is required

db

(character) database IDs from. see below for options

ids

(character) column name holding taxonomic IDs to use. if given, db is required

Value

an object of class data.frame

db options

  • bold: Barcode of Life

  • col: Catalogue of Life

  • eol: Encyclopedia of Life

  • gbif: Global Biodiversity Information Facility

  • iucn: International Union for Conservation of Nature Red List

  • natserv: Nature Serve

  • nbn: National Biodiversity Network (UK)

  • tol: Tree of Life

  • tropicos: Tropicos

  • itis: Integrated Taxonomic Information Service

  • ncbi: National Center for Biotechnology Information

  • worms: World Register of Marine Species

Examples

if (FALSE) { x <- system.file("examples/plant_spp.csv", package = "taxview") # assuming you only have taxonomic names # tv_prep_names(x, names = "name") # if you have taxonomic IDs (from set of allowed databases, see above) ## if a column name # tv_prep_ids(x, ids = "id", db = "eol") ## if a vector of IDs dat <- tibble::as_tibble( data.table::fread(x, stringsAsFactors = FALSE, data.table = FALSE)) out <- tv_prep_ids(x, ids = dat$id, db = "ncbi") head(out) }