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

turn table to tibble in recipe.formula #1415

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Conversation

EmilHvitfeldt
Copy link
Member

This issue was found during revdepcheck: spsanderson/healthyR.ai#349

we didn't use to check what type the data was that was passed to recipe.formula() which resulted in anything that passed tibble::as_tibble() worked. This is not ideal. This PR lets us release soon without having to fix it. Then we can later remove it so the functions does what the documentation says

Copy link
Member

@topepo topepo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this and the PR in their repo.

@@ -209,6 +209,10 @@ recipe.formula <- function(formula, data, ...) {
cli::cli_abort("{.arg data} is missing with no default.")
}

if (is.table(data)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a warning or deprecation notice for this? I'd like to get rid of this down the road; it shouldn't be supported.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i'm gonna add a warning and remove this in the following release with #1416

@EmilHvitfeldt EmilHvitfeldt merged commit 29d3871 into main Jan 22, 2025
13 checks passed
@EmilHvitfeldt EmilHvitfeldt deleted the table-input-formula-recipe branch January 22, 2025 19:20
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

Successfully merging this pull request may close these issues.

2 participants