Skip to contents

This function computes the *mean* for each column in an input matrix. See the **Details** section below for further information.

Usage

colArithmeticMeans(x, na.rm = TRUE, rows = NULL, ...)

Arguments

x

a numerical matrix features-by-samples

na.rm

logical, whether to remove NA values from x before computation

rows

(optional) numerical vector giving the rows in x or character vector matching the row names in x to operate over. If missing or rows = NULL, all the rows in x are considered for the computation of the measures

...

further arguments to colMeans2

Value

A numerical vector containing the computed score for each column in x.

Details

It is a wrapper to colMeans2 function.

Author

Alessandro Barberis

Examples

x = matrix(data = c(1,3,1,4), ncol = 2)
colArithmeticMeans(x = x)
#> [1] 2.0 2.5