\HeaderA{is.unsorted}{Test if an Object is Not Sorted}{is.unsorted}
\keyword{univar}{is.unsorted}
\begin{Description}\relax
Test if an object is not sorted, without the cost of sorting it.
\end{Description}
\begin{Usage}
\begin{verbatim}
is.unsorted(x, na.rm = FALSE, strictly = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an \R{} object with a class or a numeric, complex, character or
logical vector.
\item[\code{na.rm}] logical.  Should missing values be removed before checking?
\item[\code{strictly}] logical indicating if the check should be for
\emph{strictly} increasing values.
\end{ldescription}
\end{Arguments}
\begin{Value}
A length-one logical value.  All objects of length 0 or 1 are sorted:
the result will be \code{NA} for objects of length 2 or more except for
atomic vectors and objects with a class (where the \code{>=} or \code{>}
method is used).
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{sort}{sort}}, \code{\LinkA{order}{order}}.
\end{SeeAlso}

