Skip to content
Prev 167014 / 398503 Next

selecting parts of a table

Assuming that your dataframe is DF and those are names of columns then

?subset

 > DF <- data.frame(posit=runif(20, max=20), tvalues = runif(20, max=  
10))
 >
 > subset(DF, subset= posit > 10 & tvalues > 3.5 )
       posit  tvalues
4  14.66464 9.527535
6  14.71280 7.231015
9  14.76594 7.626381
10 14.05379 7.198893
11 14.23830 7.219855
12 17.47984 3.844767
13 10.95396 4.639608
15 13.21104 6.828144
19 11.75401 5.249528
20 12.95288 6.963767

.. should do the trick
On Jan 14, 2009, at 10:41 AM, emj83 wrote: