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

step_lencode_*() gives non-ideal errors when applied to constant vectors #229

Open
EmilHvitfeldt opened this issue Sep 23, 2024 · 0 comments
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

library(embed)
library(modeldata)

ames$const <- "red"

recipe(Street ~ const, data = ames) |>
  step_lencode_glm(const, outcome = vars(Street)) |>
  prep()
#> Error in `step_lencode_glm()`:
#> Caused by error in `purrr::map()`:
#> ℹ In index: 1.
#> ℹ With name: const.
#> Caused by error in `contrasts<-`:
#> ! contrasts can be applied only to factors with 2 or more levels
@EmilHvitfeldt EmilHvitfeldt added the feature a feature request or enhancement label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant