Re: [R] sorting a data frame by rownames

2008-07-08 Thread Jorge Ivan Velez
Dear Michael, Is this what you are looking for? ex.dat$rn=as.numeric(rownames(ex.dat)) ex.dat # Are new3 and ex.dat equals? all.equal(new3,ex.dat) [1] TRUE HTH, Jorge On Tue, Jul 8, 2008 at 10:58 PM, Michael Rennie <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm sure there's an easy answer to

Re: [R] sorting a data frame by rownames

2008-07-08 Thread Rolf Turner
Can't you just do newdat <- newdat[order(row.names(newdat)),] Or am I missing something? cheers, Rolf Turner On 9/07/2008, at 2:58 PM, Michael Rennie wrote: Hi there, I'm sure there's an easy answer to this, and I can't wait to see it. The question: is the