Associate columns to fields so they are recognized and appropriately treated by refdb functions.
refdb_set_fields(
x,
source = NA,
id = NA,
organism = NA,
taxonomy = NA,
sequence = NA,
marker = NA,
latitude = NA,
longitude = NA,
reference = NA,
config_yaml = NULL
)a reference database (tibble).
name of the column which contains the data source.
name of the column which contains the record IDs.
name of the column which contains the names of the organisms.
a vector of column names.
name of the column which contains the sequences.
name of the column which contains marker names.
name of the column which contains latitudes (WGS 84)
name of the column which contains longitudes (WGS 84).
a vector of column names.
a file path to a YAML file
The function returns x with updated attributes.
Taxonomy reordering. NA to ignore, NULL to delete. Fields set using config_yaml always overwrite those set by arguments
lib <- read.csv(system.file("extdata", "ephem.csv", package = "refdb"))
lib <- refdb_set_fields(lib,
taxonomy = c(family = "family_name",
genus = "genus_name",
species = "species_name"),
sequence = "DNA_seq",
marker = "marker")