Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setdiff results in error #278

Closed
eutwt opened this issue Aug 9, 2021 · 2 comments · Fixed by #279
Closed

setdiff results in error #278

eutwt opened this issue Aug 9, 2021 · 2 comments · Fixed by #279

Comments

@eutwt
Copy link
Collaborator

eutwt commented Aug 9, 2021

Using setdiff causes an error

library(dplyr, warn.conflicts = FALSE)
library(data.table, warn.conflicts = FALSE)
a <- data.table(x = 1:2)
b <- data.table(x = 2)
setdiff(a, b)
#>    x
#> 1: 1

library(dtplyr, warn.conflicts = FALSE)
setdiff(a, b)
#> Error in step_set(x, y, style = "setdiff"): is_step(y) is not TRUE

Created on 2021-08-09 by the reprex package (v2.0.1)

@markfairbanks
Copy link
Collaborator

@eutwt All set

library(dplyr, warn.conflicts = FALSE)
library(data.table, warn.conflicts = FALSE)
library(dtplyr, warn.conflicts = FALSE)

a <- data.table(x = 1:2)
b <- data.table(x = 2)
setdiff(a, b)
#> Source: local data table [1 x 1]
#> Call:   fsetdiff(`_DT1`, `_DT2`)
#> 
#>       x
#>   <int>
#> 1     1
#> 
#> # Use as.data.table()/as.data.frame()/as_tibble() to access results

@eutwt
Copy link
Collaborator Author

eutwt commented Aug 16, 2021

Awesome thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants