mean.list {popbio}R Documentation

Calculate mean matrix

Description

Calculates mean matrix from a list of matrices

Usage

## S3 method for class 'list':
mean(x, ...)

Arguments

x A list of two or more matrices
... Additional arguments passed to rowMeans

Details

Returns the mean matrix from a list of matrices using a combination of unlist and rowMeans. See example for details.

Value

The mean matrix

Note

S3 method for the mean of a list of matrices.

Author(s)

Chris Stubben

Examples

data(hudsonia)
mean(hudsonia)
## or
x <- matrix(unlist(hudsonia), ncol=length(hudsonia) )
matrix(rowMeans(x), 6, 6)

[Package popbio version 1.1.11 Index]