Prepare taxonomic data

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

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



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


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


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


(character) database IDs from. see below for options


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


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


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) }