-
Notifications
You must be signed in to change notification settings - Fork 420
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
Internal error discovered in pivot_wider() #1482
Labels
bug
an unexpected problem or unintended behavior
pivoting ♻️
pivot rectangular data to different "shapes"
Comments
Same issue discovered when using
|
This seems to be about selecting columns that don't exist: library(tidyverse)
df <- tibble(y = c("a", "a", "b", "c"), z = c(21, 22, 23, 24))
pivot_wider(df, id_cols = all_of(c("a", "b", "c")), names_from = y, values_from = z)
#> 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.
pivot_wider(df, id_cols = 1:2, names_from = y, values_from = z)
#> Error in `rethrow_id_cols_oob()`:
#> ! `i` must be a single string, not an integer 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.
Created on 2023-11-01 with reprex v2.0.2 |
hadley
added
bug
an unexpected problem or unintended behavior
pivoting ♻️
pivot rectangular data to different "shapes"
labels
Nov 1, 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
pivoting ♻️
pivot rectangular data to different "shapes"
The function pivot_wider() produces an error:
The text was updated successfully, but these errors were encountered: