I have two vectors (sets) like this:
first<-c(1,2,3,4,5) second<-c(2,4,5)
how can I detect that whether second is subset
second
Here's another
setequal(intersect(first, second), second) ## [1] TRUE
Or
all(is.element(second, first)) ## [1] TRUE