Skip to content
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

Error in vctrs::vec_locate_matches(): #1948

Open
nevesjcg opened this issue Aug 7, 2024 · 1 comment
Open

Error in vctrs::vec_locate_matches(): #1948

nevesjcg opened this issue Aug 7, 2024 · 1 comment

Comments

@nevesjcg
Copy link

nevesjcg commented Aug 7, 2024

recipe_spec <- (train) %>%

  • update_role(rowid, country, year,               new_role = "indicator") %>% 
    
  • update_role(PS, A, S, PD, U, PG, E, P, PH, ES,  new_role = "predictor") %>% 
    
  • update_role(gdp, gini, inflation,               new_role = "outcome") 
    

Error in vctrs::vec_locate_matches():
! Unsupported vctrs type null.
ℹ In file type-info.c at line 189.
ℹ Install the winch package to get additional debugging info the next time you get this error.
ℹ This is an internal error that was detected in the vctrs package.
Please report it at https://github.com/r-lib/vctrs/issues with a reprex and the full backtrace.
Backtrace:

  1. ├─... %>% ...
  2. ├─recipes::update_role(., gdp, gini, inflation, new_role = "outcome")
  3. ├─recipes::update_role(., PS, A, S, PD, U, PG, E, P, PH, ES, new_role = "predictor")
  4. ├─recipes::update_role(., rowid, country, year, new_role = "indicator")
  5. │ └─recipes::recipes_eval_select(terms, data, info, check_case_weights = FALSE)
  6. │ └─vctrs::vec_locate_matches(names(data), info$variable, no_match = "error")
  7. └─rlang:::stop_internal_c_lib(...)
  8. └─rlang::abort(message, call = call, .internal = TRUE, .frame = frame)
    Warning messages:
    1: Unknown or uninitialised column: template.
    2: Unknown or uninitialised column: var_info.
@DavisVaughan
Copy link
Member

Could you please turn this into a self-contained reprex (short for minimal reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.

If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page.

You can install reprex by running (you may already have it, though, if you have the tidyverse package installed):

install.packages("reprex")

Thanks

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

No branches or pull requests

2 participants