[R] rearranging vectors

Nigel.Walker at studentmail.newcastle.edu.au Nigel.Walker at studentmail.newcastle.edu.au
Fri Oct 12 03:20:34 CEST 2007


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