The code show error message as below
This tidyselect interface doesn't support predicates.
It means lazy_dt not support across ? Thanks !
library(tidyverse)
library(dtplyr)
diamonds %>% lazy_dt() %>% group_by(color) %>%
summarise(across(where(is.numeric), ~ sum(.)))
The issue is that
dtplyrdoes not supportwhere(). See this closed issue on GH.Instead one possible workaround would be to use a vector of the names of numeric columns with
all_of:or use
summarise_if(however, be aware thatsummarise_ifis superseded):