tomic_to_matrix: Tomic To Matrix

View source: R/export.R

tomic_to_matrixR Documentation

Tomic To Matrix

Description

Convert a T*Omic object to a feature x sample matrix matching the feature and sample ordering of a Triple Omic object.

Usage

tomic_to_matrix(tomic, value_var = NULL, transpose = FALSE)

Arguments

tomic

Either a tidy_omic or triple_omic object

value_var

measurement variable to use for the matrix

transpose

if TRUE then samples will be stored as rows. If FALSE (default) then samples will be columns.

Details

Comparing the matrix to feature or sample variable vectors should work because the orders are matched. But, if features or samples are reordered after creating the matrix then the matrix's dimensions will no longer be aligned to feature and samples.

Value

a matrix with features as rows and samples as columns (if transpose FALSE) or features as columns and samples as rows (if transpose is TRUE).

Examples

tomic_to_matrix(brauer_2008_triple)

calico/romic documentation built on Sept. 27, 2024, 7:16 p.m.