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 <atte...@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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.