columnwise: Apply a function columnwise to groups of rows

Description Usage Arguments Value

Description

Apply a function columnwise to groups of rows

Usage

1
columnwise(f, mat, by, ...)

Arguments

f

Function

mat

Matrix

by

Factor of length nrow(mat) used to group rows

...

Arguments passed on to f

Value

A matrix with ncol(mat) columns and length(unique(by)) * n rows, where n is the length of the result returned by f.


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