rowM: Calculates the mean of each row of a matrix (though having...

rowMR Documentation

Calculates the mean of each row of a matrix (though having only one column).

Description

Calculates the mean of each row of a matrix (though having only one column).

Usage

rowM(x)

Arguments

x

a matrix object.

Value

A vector with the mean of each row of x, even if the matrix only contains one column.

Examples

# Build a matrix with one column
  M <- matrix(rnorm(10), nrow=1)
# rowM (resulting on the same matrix M)
  rowM(M)

# Build a matrix
  M <- matrix (runif(100), nrow=10)
# Apply rowM function
  rowM(M)


malucalle/selbal documentation built on May 31, 2024, 2:36 p.m.