Update a Tidy 'Omics data and schema to reflect newly added fields.

update_tidy_omic(tidy_omic, updated_tidy_data, new_variable_tables = c())

Arguments

tidy_omic

an object of class tidy_omic produced by create_tidy_omic

updated_tidy_data

a tibble of data to use to update tidy_omic.

new_variable_tables

a named character vector of newly added variables in updated_tidy_data (names) and the table features, samples, measurements they apply to (values).

Value

a tidy_omic object with an updated schema and/or data.

Examples


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")