library(dplyr)
measurement_df <- tidyr::expand_grid(
feature_id = 1:10,
sample_id = LETTERS[1:5]
) %>%
dplyr::mutate(value = rnorm(n()))
feature_df <- tibble(
feature_id = 1:10,
feature_group = rep(c("a", "b"), each = 5)
)
sample_df <- tibble(
sample_id = LETTERS[1:5],
sample_group = c("a", "a", "b", "b", "b")
)
triple_omic <- create_triple_omic(
measurement_df, feature_df, sample_df,
"feature_id", "sample_id"
)
triple_to_tidy(triple_omic)
Run the code above in your browser using DataLab