group_modify.dtplyr_step {dtplyr} | R Documentation |
group_modify()
applies .f
to each group, returning a modified
lazy_dt()
. This function is a little less flexible than the data.frame
method due to the constraints of the code generation that dtplyr uses.
## S3 method for class 'dtplyr_step' group_modify(.tbl, .f, ..., keep = FALSE)
.tbl |
A lazy_dt |
.f |
The name of a two argument function. The first argument is passed
|
... |
Additional arguments passed to |
keep |
Not supported for lazy_dt. |
library(dplyr) mtcars %>% lazy_dt() %>% group_by(cyl) %>% group_modify(head, n = 2L)