intersect,DataFrame,DataFrame-method {SparkR} | R Documentation |
Return a new DataFrame containing rows only in both this DataFrame and another DataFrame. This is equivalent to 'INTERSECT' in SQL.
## S4 method for signature 'DataFrame,DataFrame' intersect(x, y) intersect(x, y)
x |
A Spark DataFrame |
y |
A Spark DataFrame |
A DataFrame containing the result of the intersect.
## Not run:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D df1 <- jsonFile(sqlContext, path)
##D df2 <- jsonFile(sqlContext, path2)
##D intersectDF <- intersect(df, df2)
## End(Not run)