Get trait values for the data from the Vault database.
Usage
get_traits(
con = NULL,
classify_to = c("original", "species", "genus", "family"),
verbose = TRUE,
classification_data = NULL
)Arguments
- con
A connection object created using
open_vault().- classify_to
A character vector specifying the taxonomic level to classify the taxa to. Default is
original.- verbose
A
logicalindicating whether to print messages. Default isTRUE.- classification_data
An optional
data.frame(ortibble) used instead of theTaxonClassificationtable in the database. Must containtaxon_idand the column matchingclassify_to(e.g.taxon_genuswhenclassify_to = "genus"). IfNULL(default), the database table is used. Obtain a valid table viaget_classification_table(con, return_raw_data = TRUE).
Details
If the function is used after get_taxa(), the trait values will be
returned only for the taxa present in the data. If you prefer to
return all trait values, we recommend using get_traits() before
get_taxa() in the pipe.
In addition, it is important to set classify_to to the same value
as in get_taxa().