limma (version 3.28.14)

avearrays: Average Over Replicate Arrays

Description

Condense a microarray data object so that technical replicate arrays are replaced with (weighted) averages.

Usage

"avearrays"(x, ID=colnames(x), weights=NULL) "avearrays"(x, ID=colnames(x), weights=x$weights) "avearrays"(x, ID=colnames(x), weights=x$weights)

Arguments

x
a matrix-like object, usually a matrix, MAList or EList object.
ID
sample identifier.
weights
numeric matrix of non-negative weights

Value

A data object of the same class as x with a column for each unique value of ID.

Details

A new data object is computed in which technical replicate arrays are replaced by their (weighted) averages.

For an MAList object, the components M and A are both averaged in this way, as are weights and any matrices found in object$other.

EList objects are similar, except that the E component is averaged instead of M and A.

If x is of mode "character", then the replicate values are assumed to be equal and the first is taken as the average.

See Also

avereps. 02.Classes gives an overview of data classes used in LIMMA.

Examples

Run this code
x <- matrix(rnorm(8*3),8,3)
colnames(x) <- c("a","a","b")
avearrays(x)

Run the code above in your browser using DataCamp Workspace