Nigel.Walker at studentmail.newcastle.edu.au
2007-Oct-12 01:20 UTC
[R] rearranging vectors
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
?rev 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