\HeaderA{binByRef}{Bin a test data set using bins previously created by probability binning 
a control dataset}{binByRef}
\keyword{misc}{binByRef}
\begin{Description}\relax
The bins generated by probability binning a control data set can be applied to a
test data set to perfom statistical comparisions by methods such as the Chi-squared
test or the probability binning statistic.
\end{Description}
\begin{Usage}
\begin{verbatim}
binByRef(binRes, data)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{binRes}] The result generated by calling teh \code{probBin}
function on a control dataset.
\item[\code{data}] An object of class \code{\LinkA{flowFrame}{flowFrame}}
\end{ldescription}
\end{Arguments}
\begin{Value}
An enviroment containing the matrices for each bin of the test data set
\end{Value}
\begin{Author}\relax
Nishant Gopalakrishnan
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plotBins}{plotBins}}, \code{\LinkA{proBin}{proBin}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

data(GvHD)
resCtrl<-proBin(GvHD[[1]],200)  
resSample<-binByRef(resCtrl,GvHD[[2]])
ls(resSample)
\end{ExampleCode}
\end{Examples}

