[R] ordering a data frame to same order as a chr vector
andy_liaw at merck.com
Mon Jan 23 17:10:34 CET 2006
This is an FAQ that's not in the official FAQ (I believe). Do
RSiteSearch("sort.data.frame") in R and you'll see.
From: Ken Termiso
> Hi all,
> I've got a data frame that has an identical column to a chr
> vector. I would
> like to use the chr vector to order the rows of the data frame to be
> identical to the order in the chr vector (the contents of the
> chr vector are
> completely identical to one col of the data frame), but this
> is proving
> trickier than it sounds..
> Any help would be much obliged,
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help