i have 2 lists of ids.
i compare 2 lists, in particular interested in following figures:
- how many ids both in list , b
- how many ids in not in b
- how many ids in b not in a
i love draw venn diagram.
here basics try out:
> = c("dog", "cat", "mouse") > b = c("tiger","lion","cat") > %in% b [1] false true false > intersect(a,b) [1] "cat" > setdiff(a,b) [1] "dog" "mouse" > setdiff(b,a) [1] "tiger" "lion"
similarly, counts as:
> length(intersect(a,b)) [1] 1 > length(setdiff(a,b)) [1] 2 > length(setdiff(b,a)) [1] 2
Comments
Post a Comment