\Header{rev}{Reverse a Vector's Elements}
\keyword{manip}{rev}
\begin{Description}\relax
\code{rev}
provides a reversed version of its argument.
It can be used in combination with
\code{sort} to obtain vectors sorted into descending order.\end{Description}
\begin{Usage}
\begin{verbatim}
rev(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a vector.
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{seq}}, \code{\Link{sort}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- c(1:5,5:3)
# sort into descending order
rev(sort(x))
stopifnot(rev(1:7) == 7:1)#- don't need `rev' here
\end{ExampleCode}
\end{Examples}

