\HeaderA{avereps}{Average Over Irregular Replicate Spots}{avereps}
\methaliasA{avereps.default}{avereps}{avereps.default}
\methaliasA{avereps.MAList}{avereps}{avereps.MAList}
\keyword{array}{avereps}
\begin{Description}\relax
Condense a microarray data object so that values for within-array replicate spots are replaced with their average.
\end{Description}
\begin{Usage}
\begin{verbatim}
## Default S3 method:
avereps(x, ID=rownames(x))
## S3 method for class 'MAList':
avereps(x, ID=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix-like object, usually a matrix or an \code{MAList} object.
\item[\code{ID}] probe identifier.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
A new data object is computed in which each probe is represented by the average of its replicate spots.
For an \code{MAList} object, the components \code{M} and \code{A} are both averaged in this way, as \code{weights} and any matrices found in \code{object\$other}.

For an \code{MAList} object, \code{ID} defaults to \code{MA\$genes\$ID} is that exists, otherwise to \code{rownames(MA\$M)}.

If \code{x} is of mode \code{"character"}, then the replicate values are assumed to be equal and the first is taken as the average.
\end{Details}
\begin{Value}
A data object of the same class as \code{x} with a row for each unique value of \code{ID}.
\end{Value}
\begin{Author}\relax
Gordon Smyth
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{dimnames}{dimnames}} in the base package.

\LinkA{02.Classes}{02.Classes} gives an overview of data classes used in LIMMA.
\end{SeeAlso}

