Re: [R] Simple ordering or sorting question

2011-05-18 Thread David Kaplan
That did it. Thanks!! David === David Kaplan, Ph.D. Professor Department of Educational Psychology University of Wisconsin - Madison Educational Sciences, Room, 1082B 1025 W. Johnson Street Madison, WI 53706 email: dkap...@edu

Re: [R] Simple ordering or sorting question

2011-05-18 Thread jim holtman
It looks like your row numbers are "characters" because that is the sort sequence you are getting. Try df <- df[order(as.numeric(rownames(df))), ] On Wed, May 18, 2011 at 2:42 PM, David Kaplan wrote: > Greetings, > > I'm trying to simply reorder a data frame on the row numbers.  So, for > exampl

[R] Simple ordering or sorting question

2011-05-18 Thread David Kaplan
Greetings, I'm trying to simply reorder a data frame on the row numbers. So, for example, instead of getting 1,2,3,4,5,6,7,8,9,10,11, ... 100 ..., I get instead 1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, ... I've tried commands such as df <- df[order(rownames(df)),] and