Learn R Programming

romic (version 1.3.3)

tomic_to_matrix: 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)

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

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.

Examples

Run this code
tomic_to_matrix(brauer_2008_triple)

Run the code above in your browser using DataLab