Skip to content

Conversation

hrryt
Copy link

@hrryt hrryt commented May 24, 2025

Fixes #1593.

Supplies an additional message to vctrs_error_subscript_oob if the user does not supply names_from or values_from to pivot_wider() or build_wider_spec().

pivot_wider(us_rent_income)

Before:

Error in `pivot_wider()`:
! Can't select columns that don't exist.
✖ Column `name` doesn't exist.
Run `rlang::last_trace()` to see where the error occurred.

After:

Error in `pivot_wider()`:
ℹ Column `name` is the default for the `names_from` argument.
Caused by error in `pivot_wider()`:
! Can't select columns that don't exist.
✖ Column `name` doesn't exist.
Run `rlang::last_trace()` to see where the error occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Message: pivot_wider() Help those who are a little undercaffeinated, slow on the uptake...
1 participant