You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you apply "expand" to data that has been grouped, a somewhat confusing error message suggests incorrectly that the variable being expanded on does not exist. A more helpful error message would say "you cannot expand on a variable by which the data is grouped. Run 'groups()' on your tibble to find variable groupings, or apply ungroup() first".
> bob = tibble(x=c(1,2,3), y=c("abe","bob","abe"))
> bob = bob %>% group_by(x)
> expand(bob, x, y)
Error in `reframe()`:
ℹ In argument: `expand(data = pick(everything()), ..., .name_repair = .name_repair)`.
ℹ In group 1: `x = 1`.
Caused by error: ! object 'x' not found
Run `rlang::last_trace()` to see where the error occurred.
>expand(ungroup(bob),x,y)
The text was updated successfully, but these errors were encountered:
Could you please rework your reproducible example to use the reprex package ? That makes it easier to see both the input and the output, formatted in such a way that I can easily re-run in a local session.
When you apply "expand" to data that has been grouped, a somewhat confusing error message suggests incorrectly that the variable being expanded on does not exist. A more helpful error message would say "you cannot expand on a variable by which the data is grouped. Run 'groups()' on your tibble to find variable groupings, or apply ungroup() first".
The text was updated successfully, but these errors were encountered: