[R] how to order a dataframe ?

Philippe Grosjean phgrosjean at sciviews.org
Wed May 7 19:00:52 CEST 2003


mydf[order(mydf$colname), ]

Best,

Philippe Grosjean

...........]<(({?<...............<?}))><...............................
 ) ) ) ) )
( ( ( ( (       Dr. Philippe Grosjean
 ) ) ) ) )
( ( ( ( (       LOV, UMR 7093
 ) ) ) ) )      Station Zoologique
( ( ( ( (       Observatoire Oceanologique
 ) ) ) ) )      BP 28   
( ( ( ( (       06234 Villefranche sur mer cedex
 ) ) ) ) )      France
( ( ( ( (
 ) ) ) ) )      tel: +33.4.93.76.38.18, fax: +33.4.93.76.38.34
( ( ( ( ( 
 ) ) ) ) )      e-mail: phgrosjean at sciviews.org
( ( ( ( (       SciViews project coordinator (http://www.sciviews.org)
 ) ) ) ) )
.......................................................................

 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Laurent Faisnel
Sent: mercredi 7 mai 2003 6:21
To: r-help at stat.math.ethz.ch
Subject: [R] how to order a dataframe ?


Hi,
I've got a problem which seemed simple to me at first view, but which I 
haven't managed to solve yet. I have a dataframe, or a matrix, and I 
would like to order it along with one of the variables/columns. I tried 
to use order() but it remained quite unclear to me. How should I proceed ?
Thanks in advance (I guess that's not very difficult a question for most 
of you)

Laurent

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list