% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setops64.R
\name{union}
\alias{union}
\alias{intersect}
\alias{setequal}
\alias{setdiff}
\alias{is.element}
\title{Set Operations}
\usage{
union(x, y)

intersect(x, y)

setequal(x, y)

setdiff(x, y)

is.element(el, set)
}
\arguments{
\item{x, y, el, set}{vectors (of the same mode) containing a sequence
    of items (conceptually) with no duplicated values.}
}
\value{
For union, a vector of a common mode or class.

For intersect, a vector of a common mode or class, or NULL if x or y is NULL.

For setdiff, a vector of the same mode or class as x.

A logical scalar for setequal and a logical of the same length as x for is.element.
}
\description{
Performs set union, intersection, (asymmetric!) difference, equality and membership on two vectors. As soon as an integer64 vector is involved, the operations are performed using integer64 semantics. Otherwise the \code{base} package functions are called.
}
\examples{
x <- as.integer64(1:5)
y <- c(1L, 3L, 5L, 7L)
union(x, y)
intersect(x, y)
setdiff(x, y)
setequal(x, y)
is.element(x, y)

}
\seealso{
\link[base:sets]{base::union}
}
