\Header{detectReplicas}{detectReplicas}
\keyword{utilities}{detectReplicas}
\begin{Description}\relax
The function returns for each unique item all corresponding indexes.
\end{Description}
\begin{Usage}
\begin{verbatim}detectReplicas(arrayDescription, spotIdentifier = "ID", identifiersToBeSkipped = "Blank")\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{arrayDescription}] an object of class \code{data.frame}
which contains a column named as
\code{spotIdentifier}; required; default missing

\item[\code{spotIdentifier}] character string; required; default: "ID"
\item[\code{identifiersToBeSkipped}] vector of character strings;
required; default: "Blank";
items of the column \code{spotIdentifier}
for which no replica detection takes place
\end{ldescription}
\end{Arguments}
\begin{Value}
A list which contains \code{nrOfReplicas} and
\code{spotReplicas}.  \code{nrOfReplicas}: one
integer characterizing the number of spot replicas
given for each identifier if existing or otherwise  \code{NA}.
\code{spotReplicas}: a list of the length of the unique
identifiers where each element contains a vector of
indexes corresponding to the given identifier (i.e. the
name of the list element) otherwise \code{NA}.
\end{Value}
\begin{Author}\relax
Andreas Buness <a.buness@dkfz.de>
\end{Author}
\begin{Examples}
\begin{ExampleCode}

aD <- data.frame(ID=c("z", "x", "x", "x", "y", "z", "z", "y", "y"))
re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2"))
stopifnot(re[["nrOfReplicas"]] == 3 )

aD <- data.frame(ID=c("Blank", "Control1", "Blank", "Control2"))
re <- detectReplicas(aD, identifiersToBeSkipped = c("Blank", "Control1", "Control2"))
stopifnot(is.na(re[["nrOfReplicas"]]))

 
  \end{ExampleCode}
\end{Examples}

