\Header{removeSpots}{Remove specified spots from objects}
\keyword{utilities}{removeSpots}
\begin{Description}\relax
All elements matching the strings in \code{spotsToBeRemoved}
are taken out of the object \code{arrayDataObject} and 
the corresponding ones out of the
object \code{exprSetRGObject} as well,
if supplied.
\end{Description}
\begin{Usage}
\begin{verbatim}removeSpots(arrayDataObject, exprSetRGObject=NULL, spotsToBeRemoved=NULL, spotIdentifier="Name")\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{arrayDataObject}] object of type \code{\Link{arrayData}};
required; default: missing
\item[\code{exprSetRGObject}] object of type \code{\Link{exprSetRG}};
optional; default: \code{NULL}
\item[\code{spotIdentifier}] character string, i.e. name of the
column of \code{getSpotAttr(arrayDataObject)}
used for matching;
default "Name"
\item[\code{spotsToBeRemoved}] vector of character strings;
default: \code{NULL}
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\end{Details}
\begin{Value}
A named list containing
an object of type \code{\Link{arrayData}} labelled "arrayDataObject",
an object of type \code{\Link{exprSetRG}} labelled "exprSetRGObject"
and an integer specifying the number of removed items
labelled "nrOfRemovedItems".
\end{Value}
\begin{Author}\relax
Andreas Buness <a.buness@dkfz.de>
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{arrayData-class}},
\code{\Link{exprSetRG-class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

  intensities <- array(data=runif(600),dim=c(100,2,3))
  dimnames(intensities) <- list(NULL, c("green","red"), NULL)
  arrayDataObject <- new("arrayData", intensities=intensities, spotAttr=data.frame(Name=I(rep(c("x","y","Blank","Blank","z"),20))), hybAttrList=NULL)
  res <- removeSpots(arrayDataObject, spotsToBeRemoved=c("x","z"))
  stopifnot( dim(getIntensities(res[["arrayDataObject"]]))[1] == 3*20 )

   
  \end{ExampleCode}
\end{Examples}

