triple_to_tidy: Triple Omic to Tidy Omic

triple_to_tidyR Documentation

Triple Omic to Tidy Omic

Description

Convert a triple_omic object into a tidy_omic oobject.

Usage

triple_to_tidy(triple_omic)

Arguments

triple_omic

an object of class triple_omic produced by create_triple_omic

Details

Features, samples and measurements will be merged into a single data table, and the design will be preserved as-is.

Value

A tidy_omic object as created by create_tidy_omic.

Examples


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)

romic documentation built on Sept. 21, 2023, 9:06 a.m.