Re: [R] Questions for manipulating datasets in R e.g. sorting andmatching

From: Dimitris Rizopoulos <>
Date: Thu 23 Feb 2006 - 20:17:38 EST

regarding your 1st question you can still use order(), i.e., order(Data[,5], Data[,6], Data[,8]); regarding you 2nd question look at ?merge.

I hope it helps.


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

Hello everyone,

I want to sort a dataset in R, using multiple columns as sorting criteria. I know I can sort a dataset "Data" with 14 columns using one column (the fifth), by typing:


But how can the dataset be sorted by column 5, then by 6, then by 8?

Another question is, how two datasets can be matched by a column present
in both of them?


Stefanie von Felten

ETH Zürich
Institut für Pflanzenwissenschaften
ETH Zentrum, LFW A 2

Telefon: 044 632 85 97
Telefax: 044 632 11 53


Universität Zürich
Institut für Umweltwissenschaften
Winterthurerstrasse 190
8057 Zürich

Telefon: 044 635 61 23
Telefax: 044 635 57 11

______________________________________________ mailing list PLEASE do read the posting guide! Disclaimer:
______________________________________________ mailing list PLEASE do read the posting guide!
Received on Thu Feb 23 20:25:07 2006

This archive was generated by hypermail 2.1.8 : Thu 23 Feb 2006 - 21:08:45 EST