Re: [R] Order data frame

2009-06-13 Thread Jorge Ivan Velez
Dear Marcio, Take a look at http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:sort HTH, Jorge On Fri, Jun 12, 2009 at 2:54 PM, MarcioRibeiro wrote: > > Hi listers, > I have a data frame with 5 variables... And I wan

Re: [R] Order data frame

2009-06-13 Thread Uwe Ligges
I asked Google for "order data.frame" and got some good answers Uwe Ligges MarcioRibeiro wrote: Hi listers, I have a data frame with 5 variables... And I want reorder the data frame according a specific variable X... I checked the sort and order functions... In my case I think that the OR

Re: [R] Order data frame

2009-06-12 Thread Henrique Dallazuanna
Try this: DF <- data.frame(ID = sample(5), v = rnorm(5)) DF[order(DF$ID),] On Fri, Jun 12, 2009 at 3:54 PM, MarcioRibeiro wrote: > > Hi listers, > I have a data frame with 5 variables... And I want reorder the data frame > according a specific variable X... > I checked the sort and order functi