-
Notifications
You must be signed in to change notification settings - Fork 421
Closed
Description
Hi, I found this error for a different situation than #1609 that I'm not sure are addressed by the fixes for that issue.
df <- tibble(col1 = c("x", "y"), col2 = c(1, 2), col3 = c("a", "b"), col4 = c("c", "d"))
df %>% pivot_wider(id_cols = all_of(c("col1","col2")), names_from = col3, values_from = -all_of(c("col1", "col4")))
Error:
Error in `rethrow_id_cols_oob()`:
! `i` must be a single string, not a character vector.
ℹ This is an internal error that was detected in the tidyr package.
Please report it at <https://github.com/tidyverse/tidyr/issues> with a reprex (<https://tidyverse.org/help/>) and the full backtrace.
Run `rlang::last_trace()` to see where the error occurred.
No error:
df %>% pivot_wider(id_cols = all_of(c("col1","col2")), names_from = col3, values_from = -all_of(c("col1", "col2", "col4")))
Metadata
Metadata
Assignees
Labels
No labels