Closed andreassoteriadesmoj closed 2 years ago
Have you updated to the latest version of dtplyr
? Everything works fine when I run this.
library(data.table)
library(dtplyr)
library(dplyr, warn.conflicts = FALSE)
group <- 'Species'
iris %>%
data.table::as.data.table() %>%
dplyr::group_by(
dplyr::across(
dplyr::all_of(group)
)
) %>%
dplyr::summarize(n = dplyr::n())
#> Source: local data table [3 x 2]
#> Call: `_DT1`[, .(n = .N), keyby = .(Species)]
#>
#> Species n
#> <fct> <int>
#> 1 setosa 50
#> 2 versicolor 50
#> 3 virginica 50
#>
#> # Use as.data.table()/as.data.frame()/as_tibble() to access results
I just hit this bug right now. Trying on the development version.
@groceryheist do you have an example this occurs on? Or does it occur on the example above?
This works fine for me on both the CRAN version and the development version.
It worked fine on the development version
Have you updated to the latest version of
dtplyr
? Everything works fine when I run this.library(data.table) library(dtplyr) library(dplyr, warn.conflicts = FALSE) group <- 'Species' iris %>% data.table::as.data.table() %>% dplyr::group_by( dplyr::across( dplyr::all_of(group) ) ) %>% dplyr::summarize(n = dplyr::n()) #> Source: local data table [3 x 2] #> Call: `_DT1`[, .(n = .N), keyby = .(Species)] #> #> Species n #> <fct> <int> #> 1 setosa 50 #> 2 versicolor 50 #> 3 virginica 50 #> #> # Use as.data.table()/as.data.frame()/as_tibble() to access results
@markfairbanks- the update did the trick, thanks.
Hi,
Looks like
dtplyr
anddplyr:across
don't get along when the table is adata.table
instead of a data frame or tibble.Andreas