[R] help needed

Jim Lemon jim at bitwrit.com.au
Fri Dec 5 10:13:15 CET 2008


gauravbhatti wrote:
> ...
> I have to plot the t values  obtained for each id against each other. Since
> the order of the IDs in the two data frames is different , I am finding it
> difficult to plot the t values. Can anyone help in arranging the t values in
> the increasing order of the ID values like 
> 1 a1 ..............
> 2 a2 ..................
> 2 a3 .................. 
>   

Hi gauravbhatti,
Try this (assuming your data frame is named "gvb"):

gvb[order(as.character(gvb[,1])),]

Jim



More information about the R-help mailing list