multidplyr
multidplyr copied to clipboard
`group_walk` / `group_map` not working -- no applicable method for `group_map` applied to object of class "multidplyr_party_df"
Consider this example:
library(dplyr)
library(multidplyr)
cluster <- new_cluster(2)
# Works fine...
mtcars %>%
group_by(cyl) %>%
group_walk(~ write.csv(.x, paste0(.y, ".csv"))
# This fails...
mtcars %>%
group_by(cyl) %>%
partition(cluster) %>%
group_walk(~ write.csv(.x, paste0(.y, ".csv"))
# Error in UseMethod("group_map") :
# no applicable method for 'group_map' applied to an object of class "multidplyr_party_df"
Maybe because group_walk is experimental?
I have a similar issue with slice_max(), which is not experimental. It seems not all functions are supported (yet) by multidplyr?
Edit: ... and apparently the same goes for distinct()?
Thanks for the suggestion! Will definitely consider it when I'm next working on multidplyr.