Skip to content

a R function for sort a data frame.

1 message · Dimitris Rizopoulos

#
look at "?order()", e.g.,

dat[order(dat[,1]),]

will sort your data.frame wrt the first column.

I hope it helps.


Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Mario Morales" <malfonso at telecom.com.co>
To: <r-help at stat.math.ethz.ch>
Sent: Friday, April 01, 2005 5:22 AM
Subject: [R] a R function for sort a data frame.