[R] multiple logical comparisons

Erik Iverson eriki at ccbr.umn.edu
Mon Mar 22 00:12:23 CET 2010


Martin Batholdy wrote:
> thanks!
> 
> 
> 
> Now I have one more question;
> 
> How can I do the reverse?
> when %in% is == (for two vectors of different lengths); what is the equivalent to !=  ?
> 

a %in% b returns a logical vector, so

!a %in% b

returns its negation.  See order of precedence in ?Syntax.



More information about the R-help mailing list