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 of first or not? is there any function for this?
second
first
Here's one way
> all(second %in% first) [1] TRUE
1.4m articles
1.4m replys
5 comments
57.0k users