setops

0th

Percentile

Set operations.

These functions override the set functions provided in base to make them generic so that efficient versions for data frames and other tables can be provided. The default methods call the base versions.

Usage
intersect(x, y, ...)

union(x, y, ...)

setdiff(x, y, ...)

setequal(x, y, ...)

Arguments
x,y
objects to compare (ignoring order)
...
other arguments passed on to methods
Aliases
  • intersect
  • setdiff
  • setequal
  • setops
  • union
Examples
mtcars$model <- rownames(mtcars)
first <- mtcars[1:20, ]
second <- mtcars[10:32, ]

intersect(first, second)
union(first, second)
setdiff(first, second)
setdiff(second, first)

setequal(mtcars, mtcars[32:1, ])
Documentation reproduced from package dplyr, version 0.4.0.9000, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.