[R] A kind of set operation in R

Julio Sergio juliosergio at gmail.com
Thu Apr 5 21:42:34 CEST 2012


Richard M. Heiberger <rmh <at> temple.edu> writes:

> 
> At least two ways
> 
> > (!is.na(match(X, Y)))
> [1] FALSE  TRUE  TRUE FALSE  TRUE  TRUE
> > X %in% Y
> [1] FALSE  TRUE  TRUE FALSE  TRUE  TRUE

Thanks Richard!

--Sergio.



More information about the R-help mailing list