[Thank-you] [R] Help: sorting data frames
Barry Rountree
rountree at cs.uga.edu
Mon Feb 14 22:56:10 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Back in 2002, you answered a question posted to the r-help mailing list,
something like:
> Hello everyone:
> I have a data frame with two columns of data. I want to create a new
> data frame, in which the first column is sorted in accending order, and
> the elements of the second column are properly re-ordered (to be in the
> same row with their corresponding first column elements)
R> mydf[order(mydf[,1]),]
Torsten
That was exactly the question I had, the answer was exactly what I needed, and
I appreciate you taking the trouble to answer it publicly.
Thanks,
Barry Rountree
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFCER56hlM7FvEcdO8RAtvGAJ0T7urq8lBjIGQ465anqV7KaovnTwCdGpo2
BbdDRnqc43maaBdzoqa80sY=
=ZPHp
-----END PGP SIGNATURE-----
More information about the R-help
mailing list