fastIntersect {easy.utils}R 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)


[Package easy.utils version 0.0.4 Index]