\Header{uniquecombs}{find the unique rows in a matrix}
\keyword{models}{uniquecombs}
\keyword{regression}{uniquecombs}
\begin{Description}\relax
This routine returns a matrix containing all the unique rows of the
matrix supplied as its argument. That is, all the duplicate rows are
stripped out. Note that the ordering of the rows on exit is not the same
as on entry.
\end{Description}
\begin{Usage}
\begin{verbatim}
uniquecombs(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] is an \R{} matrix 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Models with more parameters than unique combinations of
covariates are not identifiable. This routine provides a means of
evaluating the number of unique combinations of coavariates in a
model. The routine calls compiled C code.
\end{Details}
\begin{Value}
A matrix consisting of the unique rows of \code{x} (in arbitrary order).
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon@stats.gla.ac.uk}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
X<-matrix(c(1,2,3,1,2,3,4,5,6,1,3,2,4,5,6,1,1,1),6,3,byrow=TRUE)
print(X)
uniquecombs(X)
\end{ExampleCode}
\end{Examples}

