Learn R Programming

dtplyr (version 1.3.1)

intersect.dtplyr_step: Set operations

Description

These are methods for the dplyr generics intersect(), union(), union_all(), and setdiff(). They are translated to data.table::fintersect(), data.table::funion(), and data.table::fsetdiff().

Usage

# S3 method for dtplyr_step
intersect(x, y, ...)

# S3 method for dtplyr_step union(x, y, ...)

# S3 method for dtplyr_step union_all(x, y, ...)

# S3 method for dtplyr_step setdiff(x, y, ...)

Arguments

x, y

A pair of lazy_dt()s.

...

Ignored

Examples

Run this code
dt1 <- lazy_dt(data.frame(x = 1:4))
dt2 <- lazy_dt(data.frame(x = c(2, 4, 6)))

intersect(dt1, dt2)
union(dt1, dt2)
setdiff(dt1, dt2)

Run the code above in your browser using DataLab