How to Apply the intersect() Function in R (Example Code)
In this R programming tutorial you’ll learn how to return the intersection of two data objects using the intersect function.
Example: Applying intersect() Function to Two Numerical Vectors
intersect(1:10, 5:20) # Intersection of vectors # [1] 5 6 7 8 9 10 |
intersect(1:10, 5:20) # Intersection of vectors # [1] 5 6 7 8 9 10