[R] How to test whether is.element() returns only TRUE's

Atte Tenkanen attenka at utu.fi
Mon Dec 17 21:24:46 CET 2012


Hi,

How can I test, whether all the values that is.element() -function returns are TRUE's

Eg.
> (is.element(c(1,4,2),c(1,2,3)))
[1]  TRUE FALSE  TRUE

This doesn't work:

> (is.element(c(1,4,2),c(1,2,3)))==TRUE
[1]  TRUE FALSE  TRUE

Best,

Atte Tenkanen, FT, MuM
http://users.utu.fi/attenka/


More information about the R-help mailing list