Re: [R] Index and dummy

2009-07-20 Thread Douglas Bates
On Sun, Jul 19, 2009 at 11:32 PM, Marujo A. wrote: > Dear R-helpers > I have 2 variables > x1=rgamma(6000, 2, 1) and x2=rgamma(6000, 3,2). I have to sort (descending) > each one and split it into groups. After this each two groups must be merged > into one until all population becomes one group.

[R] Index and dummy

2009-07-19 Thread Marujo A.
Dear R-helpers I have 2 variables x1=rgamma(6000, 2, 1) and x2=rgamma(6000, 3,2). I have to sort (descending) each one and split it into groups. After this each two groups must be merged into one until all population becomes one group. A dummy vector must be created for each group (8, 4, 2, 1)