[R] manipulating dataframe according to the values of some columns

zhihua li lzhtom at hotmail.com
Fri May 13 17:43:20 CEST 2005


hi netters,

I'm a newbie to R and there are some very simple problems puzzeled me for 
two days.

I've a dataframe here with several columns different in modes. Two of the 
columns are special for me: column 1 has the mode "factor" and column 2 has 
the mode "numeric vectors".
The values for column 1 are either "T" or "F". I wanna do two things:
Firstly, remove those rows whose values for column 1 are "F";
Secondly,sort the rows in the ascending order of values for column 2.

I believe the code to do these things is simple. But I can't figure it out. 
Please help me!

Thanks a lot!




More information about the R-help mailing list