Re: [R] Specifying the ordering of a vector

2012-04-09 Thread crmnaw
Thank you very much! This worked. -- View this message in context: http://r.789695.n4.nabble.com/Specifying-the-ordering-of-a-vector-tp4542766p4542907.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread Duncan Murdoch
On 09/04/2012 9:58 AM, crmnaw wrote: Hi, Thanks for your reply. In the example I gave in the original post, your code works. But for others, it doesn't and I'm not sure why it works for some cases and not for others. For example: x<-c(0.04,0.07,0.20,0.35,0.55,0.70) order(x) [1] 1 2 3 4 5 6 Let

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread crmnaw
Hi, Thanks for your reply. In the example I gave in the original post, your code works. But for others, it doesn't and I'm not sure why it works for some cases and not for others. For example: x<-c(0.04,0.07,0.20,0.35,0.55,0.70) order(x) [1] 1 2 3 4 5 6 Let's say I want y to be in the order 1-2

Re: [R] Specifying the ordering of a vector

2012-04-09 Thread Duncan Murdoch
On 09/04/2012 9:38 AM, crmnaw wrote: Hi, I'm trying to create a vector (or matrix row) with a specific ordering. For example, I have the following vector: x<-c(0.1,0.2,0.3,0.4,0.5,0.6) that has order order(x) [1] 1 2 3 4 5 6 I want another vector that has the same values as x, but with a dif

[R] Specifying the ordering of a vector

2012-04-09 Thread crmnaw
Hi, I'm trying to create a vector (or matrix row) with a specific ordering. For example, I have the following vector: x<-c(0.1,0.2,0.3,0.4,0.5,0.6) that has order order(x) [1] 1 2 3 4 5 6 I want another vector that has the same values as x, but with a different ordering. For example, I want