intersection | R Documentation |
Give me a bunch of vectors. I'll give you a unique list of all the values that appear in all of them.
intersection(...)
... |
as many vectors as you want |
A vector of values with no duplicates. Each value in the return vector appeared in all input vectors.
v1 <- 1:5
v2 <- 2:10
v3 <- c("1", "2", "3")
intersection(v1, v2)
intersection(v2, v3)
intersection(v1, v2, v3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.