dataset_idR/setup.R
metadata_add_substitution.Rdmetadata_add_substitution is used to align the categorical trait values used
by a contributor to the categorical values supported by the database. These values
are defined in the traits.yml file.
metadata_add_substitution(
dataset_id,
trait_name,
find,
replace,
match = "value"
)Identifier for a particular study in the database
The database defined name for a particular trait
Trait value in the original data.csv file
Trait value supported by database
Optional. "word" replaces find wherever it occurs as a whole
word/phrase within a multi-value cell, leaving the rest of the cell
untouched. Default "value" requires find to equal the entire cell, and
is omitted from the written metadata to keep existing files unchanged.
metadata.yml file with a substitution added