Re: [R] Complex sort problem

2012-05-21 Thread Petr Savicky
On Fri, May 18, 2012 at 09:20:59PM -0400, Axel Urbiz wrote: [...] > Petr: I kind of see your line of thought, but still cannot see how it works > on a specific example like this one. I did not have email in the last few days. The previous suggestion from https://stat.ethz.ch/pipermail/r-help/2

Re: [R] Complex sort problem

2012-05-18 Thread Axel Urbiz
Thanks Petr and David. Sorry David if I was not clear enough. The last comment line highlights the end objective (hopefully more clearly this time). Petr: I kind of see your line of thought, but still cannot see how it works on a specific example like this one. set.seed(1) dframe <- matrix(

Re: [R] Complex sort problem

2012-05-18 Thread David Winsemius
On May 18, 2012, at 6:37 AM, Axel Urbiz wrote: Would I be able to accomplish the same if x.sample was created from x instead of x.sorted. The problem is that in my real problem, I have to sort with respect to many variables and thus keep the sample indexes consistent across variables. So I

Re: [R] Complex sort problem

2012-05-18 Thread Petr Savicky
On Fri, May 18, 2012 at 06:37:03AM -0400, Axel Urbiz wrote: > Would I be able to accomplish the same if x.sample was created from x > instead of x.sorted. The problem is that in my real problem, I have to sort > with respect to many variables and thus keep the sample indexes consistent > across var

Re: [R] Complex sort problem

2012-05-18 Thread Axel Urbiz
Would I be able to accomplish the same if x.sample was created from x instead of x.sorted. The problem is that in my real problem, I have to sort with respect to many variables and thus keep the sample indexes consistent across variables. So I need to first take the sample and then sort it with res

Re: [R] Complex sort problem

2012-05-17 Thread Petr Savicky
On Thu, May 17, 2012 at 06:45:52AM -0400, Axel Urbiz wrote: > Dear List, > > Is there a way I can sort a sample based on a sort index constructed from > the data from which the sample is taken? Basically, I need to take 'many' > samples from the same source data and sort them. This can be very tim

Re: [R] Complex sort problem

2012-05-17 Thread David Winsemius
On May 17, 2012, at 6:45 AM, Axel Urbiz wrote: Dear List, Is there a way I can sort a sample based on a sort index constructed from the data from which the sample is taken? Basically, I need to take 'many' samples from the same source data and sort them. This can be very time consuming fo

[R] Complex sort problem

2012-05-17 Thread Axel Urbiz
Dear List, Is there a way I can sort a sample based on a sort index constructed from the data from which the sample is taken? Basically, I need to take 'many' samples from the same source data and sort them. This can be very time consuming for long vectors. Is there any way I can sort the data onl