I\'m working with two \'lists\' or vectors in R, and I need to find out the number of unique elements in both, together.
I tried doing length(summary(merge(v1, v2
length(summary(merge(v1, v2
here is my solution.
p1 <- c(1, 4, 1, 1, 4, 5, 6, 7, 8) p2 <- c(3, 4, 1, 6, 90, 10, 32) unique(c(p1, p2))