intersect() function in R Language is used to find the intersection of two Objects. This function takes two objects like Vectors, dataframes, etc. as arguments and results in a third object with the common data of both the objects.
Syntax: intersect(x, y)
x and y: Objects with sequence of items
 2 3 4
y1 1 2 2 3 3 4