[R] rearranging vectors

Benilton Carvalho bcarvalh at jhsph.edu
Fri Oct 12 03:25:57 CEST 2007


On Oct 11, 2007, at 9:20 PM,  
Nigel.Walker at studentmail.newcastle.edu.au wrote:

> Hi everyone
> I have a vector that I want to modify. A simple eg of what i want  
> to do is below
> I have a vector x
> x<-c(1,2,3,4)
> I want to change this vector or make a new one such that
> x<-c(4,3,2,1)
> Any help would be great. I just want to swap the order.
> Thanks

More information about the R-help mailing list