\HeaderA{twilight.permute.pair}{A permutation matrix of paired class labels}{twilight.permute.pair}
\keyword{datagen}{twilight.permute.pair}
\begin{Description}\relax
The function returns a matrix where each row is a (un)balanced permutation of the input twosample class labels.
\end{Description}
\begin{Usage}
\begin{verbatim}
twilight.permute.pair(v, m, bal = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{v}] A binary vector representing class labels in original order. Pairs must be in the same order. 
\item[\code{m}] A numerical value giving the number of permutations. 
\item[\code{bal}] Logical value. Results in balanced or unbalanced permutations. 
\end{ldescription}
\end{Arguments}
\begin{Value}
Returns a matrix where each row contains one permuted vector of class labels. Note that even for balanced permutations, the first row always contains the original vector.
\end{Value}
\begin{Author}\relax
Stefanie Scheid \url{http://www.molgen.mpg.de/~scheid}
\end{Author}
\begin{References}\relax
Scheid S and Spang R (2004): A stochastic downhill search algorithm for estimating the local false discovery rate, \emph{IEEE TCBB} \bold{1(3)}, 98--108.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{twilight.permute.unpair}{twilight.permute.unpair}}, \code{\LinkA{twilight.combi}{twilight.combi}}
\end{SeeAlso}

