\Header{maGenControls}{Generating a vector recording the control status of the spotted probe sequences.}
\alias{controlCode}{maGenControls}
\keyword{manip}{maGenControls}
\begin{Description}\relax
ControlCode is a matrix representing certain regular expression
pattern and the control status of the spotted probe sequences.
This function uses `grep' searches for matches to `pattern' (its first argument)
within the character vector `x' (second argument).
\end{Description}
\begin{Usage}
\begin{verbatim}
maGenControls(Gnames, controlcode, id = "ID")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{Gnames}] An object of class \code{matrix}, \code{data.frame} or \code{marrayInfo}
which contains  description of spotted probe sequences.
\item[\code{controlcode}] A character matrix of n by 2 columns. The first
column contains a few regular expression of spotted probe sequences
and the second column contains the corresponding control status.
\item[\code{id}] the column number of column name in \code{Gnames} that
contains description of each spot on the array.
\end{ldescription}
\end{Arguments}
\begin{Value}
A vector of characters recording the control status of the spotted probe sequences.
\end{Value}
\begin{Author}\relax
Jean Yee Hwa Yang
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{grep}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(swirl)
maControls(swirl) <- maGenControls(maGnames(swirl), id="Name")
table(maControls(swirl))
\end{ExampleCode}
\end{Examples}

