EML (version 2.0.4)

set_taxonomicCoverage: set_taxonomicCoverage

Description

set_taxonomicCoverage

Usage

set_taxonomicCoverage(sci_names, expand = FALSE, db = "itis")

Arguments

sci_names

string (space separated) or list or data frame of scientific names for species covered.

expand

Set to TRUE to use `[taxadb]` to expand sci_names into full taxonomic classifications

db

The taxonomic database to query (when expand is set to TRUE). See `[taxadb::filter_name]` for valid options. Defaults to 'itis'.

Value

a taxonomicCoverage object for EML

Details

Turn a data.frame or a list of scientific names into a taxonomicCoverage block sci_names can be a space-separated character string or a data frame with column names as rank name or a list of user-defined taxonomicClassification

Examples

Run this code
# NOT RUN {
sci_names <- data.frame(
  Kingdom = "Plantae",
  Phylum = "Phaeophyta",
  Class = "Phaeophyceae",
  Order = "Laminariales",
  Family = "Lessoniaceae",
  Genus = "Macrocystis",
  Species = "pyrifera"
)
taxon_coverage <- set_taxonomicCoverage(sci_names)

# }
# NOT RUN {
 # Examples that may take > 5s

## use a list of lists for multiple species
sci_names <- list(list(
  Kindom = "Plantae",
  Phylum = "Phaeophyta",
  Class = "Phaeophyceae",
  Order = "Laminariales",
  Family = "Lessoniaceae",
  Genus = "Macrocystis",
  Species = "pyrifera"
))
set_taxonomicCoverage(sci_names)

# }

Run the code above in your browser using DataLab