triple_to_tidy | R Documentation |
Convert a triple_omic
object into a tidy_omic
oobject.
triple_to_tidy(triple_omic)
triple_omic |
an object of class triple_omic produced by
|
Features, samples and measurements will be merged into a single data
table, and the design
will be preserved as-is.
A tidy_omic
object as created by
create_tidy_omic
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.