intersection: Intersection of sets

View source: R/all.R

intersectionR Documentation

Intersection of sets

Description

Give me a bunch of vectors. I'll give you a unique list of all the values that appear in all of them.

Usage

intersection(...)

Arguments

...

as many vectors as you want

Value

A vector of values with no duplicates. Each value in the return vector appeared in all input vectors.

Examples

v1 <- 1:5
v2 <- 2:10
v3 <- c("1", "2", "3")
intersection(v1, v2)
intersection(v2, v3)
intersection(v1, v2, v3)


adamleerich/alrtools documentation built on March 12, 2024, 11:38 p.m.