[R] TRUE/FALSE as numeric values

Thomas Preuth preuth at slf.ch
Fri Feb 23 14:38:56 CET 2007


Hello,

I want to select in a column of a dataframe all numbers smaller than a 
value x
but when I type in test<-(RSF_EU$AREA<=x) I receiv as answer:
 > test
 [1]  TRUE FALSE FALSE  TRUE  TRUE  TRUE FALSE FALSE  TRUE  TRUE  TRUE 
FALSE  TRUE  TRUE  TRUE  TRUE  TRUE
[18]  TRUE  TRUE  TRUE  TRUE FALSE FALSE  TRUE  TRUE  TRUE  TRUE  TRUE  
TRUE  TRUE FALSE  TRUE  TRUE  TRUE
[35] FALSE  TRUE  TRUE  TRUE  TRUE FALSE FALSE FALSE  TRUE  TRUE FALSE  
TRUE  TRUE FALSE FALSE  TRUE FALSE
[52]  TRUE  TRUE  TRUE  TRUE  TRUE FALSE  TRUE  TRUE FALSE  TRUE

How can i get the values smaller than x and not the TRUE/FALSE reply?

Thanks in advance,
Thomas



More information about the R-help mailing list