rowmean: Row mean matrix

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rowmean.R

Description

This function returns the row mean matrix of an input matrix

Usage

1
  rowmean(x)

Arguments

x

The input matrix. Make sure this is a matrix object

Details

This function calculates the mean of each row within the input matrix. If the matrix has dimension m x n, this function will return a m x n matrix, where each row has the same result, and the average of the n elements in the corresponding row in the input matrix.

Value

The row mean matrix

Author(s)

Yao Wang (wang1150@purdue.edu); Lingsong Zhang (lingsong@purdue.edu)

See Also

See Also in svd, apply, columnmean, doublemean, overallmean.

Examples

1
2
3
4
5
6
#generate a random matrix
x<-matrix(rnorm(100), nrow=20);

#calculate the row mean matrix
y<-rowmean(x);
y

svdvisual documentation built on May 2, 2019, 4:15 a.m.