This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/rev.html
rev {base}R Documentation

Reverse a Vector's Elements

Description

rev provides a reversed version of its argument. It can be used in combination with sort to obtain vectors sorted into descending order.

Usage

rev(x)

See Also

seq, sort.

Examples

x <- c(1:5,5:3)
# sort into descending order
rev(sort(x))
all(rev(1:7) == 7:1)#- don't need `rev' here

[Package base version 0.60 ]