Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error from summarize(.groups = "drop_last") #134

Open
d-morrison opened this issue May 4, 2022 · 0 comments
Open

error from summarize(.groups = "drop_last") #134

d-morrison opened this issue May 4, 2022 · 0 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@d-morrison
Copy link

d-morrison commented May 4, 2022

I'm getting an error when I try to use "drop_last" in summarize() with multidplyr; here's a reprex:

library(nycflights13)
library(multidplyr)

cluster <- new_cluster(4)
cluster_library(cluster, "dplyr")
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

result = 
  flights |> 
  arrange(origin, dest, year, month, day) |> 
  group_by(origin, dest, year, month, day) |> 
  partition(cluster) |>
  summarize(.groups = "drop_last",
    dep_delay = mean(dep_delay)) |> 
  mutate(
    prev_day_dep_delay = dplyr::lag(dep_delay, n = 1, default = NA)) |> 
  collect()
#> Error in `cluster_call()`:
#> ! Remote computation failed:
#> `.groups` can't be "drop_last"
#> i Possible values are NULL (default), "drop_last", "drop", "keep", and
#>   "rowwise"

Created on 2022-05-04 by the reprex package (v2.0.1)

@hadley hadley added the bug an unexpected problem or unintended behavior label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants