Skip to contents

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

Usage

summarize_matrix(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

summarize_matrix(mymatrix, myfactor)
#> Error: object 'myfactor' not found