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

Loading dtplyr breaks count() on data.table #201

Closed
mgirlich opened this issue Feb 25, 2021 · 0 comments · Fixed by #205
Closed

Loading dtplyr breaks count() on data.table #201

mgirlich opened this issue Feb 25, 2021 · 0 comments · Fixed by #205

Comments

@mgirlich
Copy link
Collaborator

count() doesn't work on a data.table anymore after loading dtplyr because tally() is missing. Of course it still works when applying lazy_dt() but loading dtplyr should not breaking otherwise working code.

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

data.table(x = 1) %>% 
  count(x)
#> Error in UseMethod("tally"): no applicable method for 'tally' applied to an object of class "c('dtplyr_step_group', 'dtplyr_step')"

Created on 2021-02-25 by the reprex package (v1.0.0)

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

data.table(x = 1) %>% 
  count(x)
#>    x n
#> 1: 1 1

Created on 2021-02-25 by the reprex package (v1.0.0)

@mgirlich mgirlich mentioned this issue Mar 2, 2021
hadley pushed a commit that referenced this issue Mar 2, 2021
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.

1 participant