powered by
Update a Tidy 'Omics data and schema to reflect newly added fields.
update_tidy_omic(tidy_omic, updated_tidy_data, new_variable_tables = c())
a tidy_omic object with an updated schema and/or data.
tidy_omic
an object of class tidy_omic produced by create_tidy_omic
create_tidy_omic
a tibble of data to use to update tidy_omic.
a named character vector of newly added variables in updated_tidy_data (names) and the table features, samples, measurements they apply to (values).
updated_tidy_data
library(dplyr) tidy_omic <- brauer_2008_tidy updated_tidy_data <- tidy_omic$data %>% mutate(new_sample_var = "foo") %>% select(-DR) new_variable_tables <- c("new_sample_var" = "samples")
Run the code above in your browser using DataLab