I have some code which seems to have broken since group_map() became group_modify(). Converting to group_modify() only partially resolves this as my function also requires additional arguments. Under the old group_map() my function received args passed in ..., but I get an error for the same function under the new group_modify().
The docs indicate I should be able to do this:
... Additional arguments passed on to .f
Is this a regression, or am I doing something wrong?
# dplyr_0.8.3
library(tidyverse)
m <- function(x, y, a, b) {
tibble(z = z)
}
mtcars %>%
group_by(cyl) %>%
group_modify(m, 1, 2) %>%
ungroup
Error in (function (.x, .y) : unused arguments (1, 2)
I have some code which seems to have broken since
group_map()becamegroup_modify(). Converting togroup_modify()only partially resolves this as my function also requires additional arguments. Under the oldgroup_map()my function received args passed in..., but I get an error for the same function under the newgroup_modify().The docs indicate I should be able to do this:
Is this a regression, or am I doing something wrong?