powered by
This is a method for the dplyr summarise() generic. It is translated to the j argument of [.data.table.
summarise()
j
[.data.table
# S3 method for dtplyr_step summarise(.data, ...)
A lazy_dt().
lazy_dt()
<data-masking> Name-value pairs of summary functions. The name will be the name of the variable in the result.
data-masking
The value can be:
A vector of length 1, e.g. min(x), n(), or sum(is.na(y)).
min(x)
n()
sum(is.na(y))
A vector of length n, e.g. quantile().
n
quantile()
A data frame, to add multiple columns from a single expression.
# NOT RUN { library(dplyr, warn.conflicts = FALSE) dt <- lazy_dt(mtcars) dt %>% group_by(cyl) %>% summarise(vs = mean(vs)) dt %>% group_by(cyl) %>% summarise(across(disp:wt, mean)) # }
Run the code above in your browser using DataLab