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

make will_make_matrix() behave consistently for 0-length factors #888

Merged
merged 3 commits into from
Feb 27, 2023

Conversation

simonpcouch
Copy link
Contributor

Closes #883, more context there!🪲

With CRAN version:

parsnip:::will_make_matrix(factor("a"))
#> [1] FALSE
parsnip:::will_make_matrix(factor(character()))
#> [1] TRUE

With this PR:

parsnip:::will_make_matrix(factor("a"))
#> [1] FALSE
parsnip:::will_make_matrix(factor(character()))
#> [1] FALSE

Created on 2023-02-23 with reprex v2.0.2

R/convert_data.R Outdated Show resolved Hide resolved
R/convert_data.R Outdated Show resolved Hide resolved
@simonpcouch simonpcouch merged commit b31773b into main Feb 27, 2023
@simonpcouch simonpcouch deleted the missing-883 branch February 27, 2023 17:37
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uninformative "outcome should be a factor" error with missing predictors
2 participants