Skip to content

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

Merged
simonpcouch merged 3 commits into
mainfrom
missing-883
Feb 27, 2023
Merged

simonpcouch merged 3 commits into
mainfrom
missing-883

Conversation

@simonpcouch

Copy link
Copy Markdown
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

@simonpcouch
simonpcouch requested a review from hfrick February 23, 2023 16:00
Comment thread R/convert_data.R Outdated
Comment thread R/convert_data.R Outdated
@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
Copy Markdown
Contributor

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