[R] logical or for two vectors or matrices

From: Federico Abascal <fede_rgroup_at_yahoo.com>
Date: Fri, 04 May 2007 06:45:00 -0500 (CDT)


it might be a very simple question but I cannot find the solution (I tried a || b, any(a,b)... but none works). My problem is:

I have two vectors,

and I would like to obtain a vector that indicates if it is TRUE in any of the two vectors. Hence, the desired output would be: TRUE, FALSE, TRUE

Thank you in advance,

        [[alternative HTML version deleted]]

R-help_at_stat.math.ethz.ch 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. Received on Fri 04 May 2007 - 11:50:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 May 2007 - 12:31:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.