R语言集合函数

union

intersect

setdiff(A,B):A-B

A %in% B :A是否存在于B