Re: [R] having problems re-ordering a dataframe

2007-10-27 Thread Chabot Denis
Thank you very much for your detailed explanation and two solutions, Duncan. Denis Le 07-10-27 à 12:44, Duncan Murdoch a écrit : > Chabot Denis wrote: >> Dear R users, >> >> I need to reorder a dataframe using 3 variables for the determine >> the sorting order. >> >> When I create a simple d

Re: [R] having problems re-ordering a dataframe

2007-10-27 Thread Duncan Murdoch
Chabot Denis wrote: > Dear R users, > > I need to reorder a dataframe using 3 variables for the determine the > sorting order. > > When I create a simple dataframe to test the method, things work as I > expected: > > a1 <- rep(1:10, each=8) > a2 <- rep(rep(1:2, each=4), 10) > a3 <- rep(c(1:4),2

[R] having problems re-ordering a dataframe

2007-10-27 Thread Chabot Denis
Dear R users, I need to reorder a dataframe using 3 variables for the determine the sorting order. When I create a simple dataframe to test the method, things work as I expected: a1 <- rep(1:10, each=8) a2 <- rep(rep(1:2, each=4), 10) a3 <- rep(c(1:4),20) (a <- data.frame(a1, a2, a3)) for e