\HeaderA{summarizeReplicates}{Summarise microarray objects}{summarizeReplicates}
\keyword{classes}{summarizeReplicates}
\begin{Description}\relax
Function to summarise measures of a \code{\LinkA{maiges}{maiges}} class object,
both by samples and genes.
\end{Description}
\begin{Usage}
\begin{verbatim}
summarizeReplicates(object=NULL, gLabelID="GeneName", sLabelID="Sample",
                    funcS="mean", funcG="mean", rmBad=TRUE, keepEmpty=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] object of class \code{\LinkA{maiges}{maiges}}.
\item[\code{gLabelID}] character string giving the gene label ID to be used
to summarise the data by rows.
\item[\code{sLabelID}] character string giving the sample label ID to be used
to summarise the data by columns.
\item[\code{funcS}] character string specifying the function to be applied
for sample replicates. Defaults to 'mean'. If NULL, no resume is
done for samples.
\item[\code{funcG}] character string specifying the function to be applied
for genes (spots) replicates. Defaults to 'mean'. If NULL, no resume is
done for genes..
\item[\code{rmBad}] logical indicating if you want to remove or not bad
spots, given by the slot \code{BadSpots} in argument \code{object}.
\item[\code{keepEmpty}] logical indicating if you want to maintain spots
with empty information.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function takes the object of class \code{\LinkA{maiges}{maiges}} and
resume the data by spots (rows) and samples (columns).
\end{Details}
\begin{Value}
This function returns another object of class \code{\LinkA{maiges}{maiges}}
with replicates summarised to only one observation.
\end{Value}
\begin{Author}\relax
Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
\end{Author}
\begin{Examples}
\begin{ExampleCode}
## Loading the dataset
data(gastro)

## Summarising the data (maigesNorm class), replicated samples will be
## summarised by mean and genes by median
gastro.summ = summarizeReplicates(gastro.norm, gLabelID="GeneName",
  sLabelID="Sample", funcS="mean", funcG="median",
  keepEmpty=FALSE, rmBad=FALSE)

## To summarise genes by mean and keep the blank spots use
gastro.summ = summarizeReplicates(gastro.norm, gLabelID="GeneName",
  sLabelID="Sample", funcS="mean", funcG="mean",
  keepEmpty=TRUE, rmBad=FALSE)
\end{ExampleCode}
\end{Examples}

