[R] Sorting dataframe by different columns
Dimitris Rizopoulos
dimitris.rizopoulos at med.kuleuven.be
Fri Jun 8 09:21:33 CEST 2007
probably the function sort.data.frame() posted in R-help some time ago
can be useful; check:
RSiteSearch("sort.data.frame")
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/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Gunther Höning" <gunther.hoening at ukmainz.de>
To: <r-help at stat.math.ethz.ch>
Sent: Friday, June 08, 2007 8:58 AM
Subject: [R] Sorting dataframe by different columns
> Dear list,
>
> I have a very short question,
> Suggest a dataframe of four columns.
>
> df <- data.frame(w,x,y,z)
>
> I want this ordered the following way:
> first by :x, decreasing = FALSE
> and
> secondly by: z, decreasing =TRUE
>
> How can this be done ?
>
> Thanks
>
> Gunther
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the R-help
mailing list