r-lib / vctrs

Generic programming with typed R vectors

Home Page:https://vctrs.r-lib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use recent important-standalone-types check

olivroy opened this issue · comments

So that the error from

mtcars2 <- dplyr::as_tibble(mtcars)
mtcars2 |> dplyr::as_tibble() |> dplyr::select(mtcars2)
# currently
Error in `select()`:
! Can't select columns with `mtcars2`.
<error/vctrs_error_subscript_type>
✖ `mtcars2` must be numeric or character, not a <tbl_df/tbl/data.frame> object.
# desired

✖ `mtcars` must be numeric or character, not a tibble.

So that changes in r-lib/rlang#1622 are reflected.

This reprex may seem silly, but I sometimes have object names that have similar names as variable names, and autocomplete may confuse me. So a shorter error message would be useful!