summarizeMatrix: Summarise the rows of a matrix, applying a function to groups...

View source: R/summarisematrix.R

summarizeMatrixR Documentation

Summarise the rows of a matrix, applying a function to groups of cells defined by a factor

Description

Note that the specified function will be applied to a tranformed version of the matrix, so colMeans(), for example, is appropriate.

Usage

summarizeMatrix(matrix, treatment_factor, summaryFunc = "colMeans")

Arguments

matrix

Numeric matrix

treatment_factor

a factor defining column groups

summaryFunc

A Function to apply to a transformed version of matrix (default: colMeans)

Value

Summarized matrix, with e.g. means in columns

Examples

summarizeMatrix(mymatrix, myfactor)


pinin4fjords/shinyngs documentation built on Feb. 28, 2024, 10:19 a.m.