forked from tidyverse/dplyr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetops.Rd
41 lines (34 loc) · 848 Bytes
/
setops.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sets.r
\name{setops}
\alias{intersect}
\alias{setdiff}
\alias{setequal}
\alias{setops}
\alias{union}
\title{Set operations.}
\usage{
intersect(x, y, ...)
union(x, y, ...)
setdiff(x, y, ...)
setequal(x, y, ...)
}
\arguments{
\item{x, y}{objects to compare (ignoring order)}
\item{...}{other arguments passed on to methods}
}
\description{
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.
}
\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, ])
}