fastIntersect: A fast version of base::intersect()

View source: R/set_ops.R

fastIntersectR Documentation

A fast version of base::intersect()

Description

A fast version of base::intersect()

Usage

fastIntersect(x, y, keep.duplicated = FALSE)

Arguments

x, y

Vectors to be compared.

keep.duplicated

Whether or not to keep duplicated elements in x

Value

A vector of a common mode.

References

https://stackoverflow.com/questions/72631297/speed-up-setdiff-intersect-union-operations-on-vectors-in-r

See Also

intersect

Examples

x <- sample(LETTERS, 12)
y <- sample(LETTERS, 12)
fastIntersect(x, y)


easy.utils documentation built on April 4, 2025, 6:13 a.m.