\Header{designMatrix}{Construct Design Matrix}
\keyword{regression}{designMatrix}
\begin{Description}\relax
Construct a design matrix from the data.frame of target information.
Currently only for two color array experiments using a common reference.
\end{Description}
\begin{Usage}
\begin{verbatim}
designMatrix(targets, ref) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{targets}] data.frame with columns \code{Cy3} and \code{Cy5} specifying which RNA was hybridized to each array
\item[\code{ref}] character string giving name of reference RNA
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
There is a need for design matrices for direct two-color design and for single-channel experiments but, this version is only for reference designs.
\end{Details}
\begin{Value}
The design matrix.\end{Value}
\begin{Author}\relax
Gordon Smyth
\end{Author}
\begin{SeeAlso}\relax
An overview of linear model functions in limma is given by \link{5.LinearModels}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
targets <- data.frame(Cy3=c("Ref","Control","Ref","Treatment"),Cy5=c("Control","Ref","Treatment","Ref"))
designMatrix(targets, "Ref")
\end{ExampleCode}
\end{Examples}

