Skip to contents

Returns a array obtained by applying a function to rows of submatrices of the input matrix, where the submatrices are divided into specified groups of columns.

Usage

applyOverColumnGroups(mat, groups, f, ...)

Arguments

mat

a matrix.

groups

a vector giving columns grouping.

f

function to be applied.

...

optional arguments to f.

Value

a matrix of dimensions nrow(mat) x nlevels(groups).