\HeaderA{get.array.subset.affybatch}{Get a subset of arrays from an affybatch object, split by phnotypic data}{get.array.subset.affybatch}
\aliasA{get.array.subset.exprset}{get.array.subset.affybatch}{get.array.subset.exprset}
\keyword{misc}{get.array.subset.affybatch}
\begin{Description}\relax
Looks at a factor in the phenotypic data for an \code{AffyBatch} or \code{exprSet} object and
uses it to select a subset of arrays, as defined by 'members'.
\end{Description}
\begin{Usage}
\begin{verbatim}
  get.array.subset.affybatch(x, group, members)
  get.array.subset.exprset(x, group, members)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An \code{AffyBatch} or \code{exprSet} object 
\item[\code{group}] The name of the pData column to use. 
\item[\code{members}] The labels within the pData column to match against. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Subsetting an \code{AffyBatch} object by array is achieved using \code{[x,]}, while the same is achieved for an \code{exprSet} by \code{[,x]}. Hence the two different functions. In general the generic method \code{\LinkA{get.array.subset}{get.array.subset}} should be used - since it sorts this all out automatically.
\end{Details}
\begin{Value}
An \code{AffyBatch} or \code{exprSet} (as appropriate) containing the selected subset of chips.
\end{Value}
\begin{Author}\relax
Crispin J Miller
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  ## Not run: 
    subset1 <- get.array.subset.affybatch(eset.rma,"group","A")
    subset2 <- get.array.subset.exprset(eset.rma,"group",c("A","P"))
    subset3 <- get.array.subset(eset.rma,"group","A")
  
## End(Not run)
\end{ExampleCode}
\end{Examples}


