Skip to content

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

@mgirlich

Description

@mgirlich

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions