each_sample: Apply function to every sample

Description Usage Arguments Value

Description

Apply function to every sample

Usage

1
each_sample(mat, f, ...)

Arguments

mat

Matrix with samples as columns and metabolites as rows

f

Function to apply to samples

...

Further arguments passed to f

Value

If f returns a vector of length 1, each_sample returns a vector with one element per sample. Otherwise if f returns a vector of the same length as its argument, each_sample returns a matrix with one column per sample, that is, the result will have the same dimensions as mat.


cbhelmholtz/metaboliteqc documentation built on May 13, 2019, 2:03 p.m.