mtl: Matrix to long-form data

View source: R/mtl.R

mtlR Documentation

Matrix to long-form data

Description

Converts sample-by-feature matrix to long-form data.table

Usage

mtl(data)

Arguments

data

An matrix of abundances, relativized or not, of taxonomic features across samples. data may be an S3 or S4 class from the Matrix package but must be coercible to a TsparseMatrix.

Details

This function is included as a convenience for quickly transforming wide-format feature tables into long-format.

Sometimes operations involving the Matrix-package classes begin to fail without explanation. When this happens, it is prudent to restart R in a fresh session.

Value

Returns a long-form data.table object where each row represents the abundance of a taxonomic feature in a sample.

Examples

to go here


bramstone/qSIP documentation built on Nov. 22, 2023, 9:11 p.m.