In R, how do you test for elements of one vector NOT present in another vector?
X <- c(\'a\',\'b\',\'c\',\'d\') Y <- c(\'b\', \'e\', \'a\',\'d\',\'c\',\'f\
You can use all and %in% to test if all values of X are also in Y:
all
%in%
X
Y
all(X %in% Y) #[1] TRUE