[R] How to order a vector

tobias.verbeke@bivv.be tobias.verbeke at bivv.be
Thu Jun 17 13:14:55 CEST 2004





r-help-bounces at stat.math.ethz.ch wrote on 17/06/2004 13:10:35:

> Hi all
>
> I have a vector like this
>
> 2003 2002 2001 2000 1999 1998 1997 1996
>  106   105  106   106    105   106   101   107
>
> How can I get it sorted right(1996....2003)?

> rev(1:4)
[1] 4 3 2 1

HTH,
Tobias




More information about the R-help mailing list