refdb_set_fields | R Documentation |
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 )
x |
a reference database (tibble). |
source |
name of the column which contains the data source. |
id |
name of the column which contains the record IDs. |
organism |
name of the column which contains the names of the organisms. |
taxonomy |
a vector of column names. |
sequence |
name of the column which contains the sequences. |
marker |
name of the column which contains marker names. |
latitude |
name of the column which contains latitudes (WGS 84) |
longitude |
name of the column which contains longitudes (WGS 84). |
reference |
a vector of column names. |
config_yaml |
a file path to a YAML file |
Taxonomy reordering. NA to ignore, NULL to delete. Fields set using config_yaml always overwrite those set by arguments
The function returns x
with updated attributes.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.