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
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
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
3 matches
Mail list logo