applyOverColumnGroups: Apply function over groups of columns

View source: R/utils.R

applyOverColumnGroupsR Documentation

Apply function over groups of columns

Description

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


bkaczkowski/xcore documentation built on Jan. 26, 2024, 6:24 p.m.