setdiff.duckplyr_df: Set difference

View source: R/setdiff.R

setdiff.duckplyr_dfR Documentation

Set difference

Description

This is a method for the dplyr::setdiff() generic. See "Fallbacks" section for differences in implementation. setdiff(x, y) finds all rows in x that aren't in y.

Usage

## S3 method for class 'duckplyr_df'
setdiff(x, y, ...)

Arguments

x, y

Pair of compatible data frames. A pair of data frames is compatible if they have the same column names (possibly in different orders) and compatible types.

...

These dots are for future extensions and must be empty.

Fallbacks

There is no DuckDB translation in setdiff.duckplyr_df()

  • if column names are duplicated in one of the tables,

  • if column names are different in both tables.

These features fall back to dplyr::setdiff(), see vignette("fallback") for details.

See Also

dplyr::setdiff()

Examples

df1 <- duckdb_tibble(x = 1:3)
df2 <- duckdb_tibble(x = 3:5)
setdiff(df1, df2)
setdiff(df2, df1)

duckdblabs/duckplyr documentation built on Feb. 20, 2025, 1:33 p.m.