How to test whether is.element() returns only TRUE's
With all().
all(is.element(c(1,4,2),c(1,2,3)))
[1] FALSE Sarah
On Mon, Dec 17, 2012 at 3:24 PM, Atte Tenkanen <attenka at utu.fi> wrote:
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,
-- Sarah Goslee http://www.functionaldiversity.org