Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Suggests:
knitr,
Matrix,
modeldata (>= 0.0.2),
recipes (>= 1.0.5),
recipes (>= 1.3.0),
rmarkdown (>= 2.3),
roxygen2,
testthat (>= 3.0.0),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# hardhat (development version)

* `mold()` no longer throws warnings about `strings_as_factors` argument when used on recipe objects (#284).

# hardhat 1.4.2

* Added `extract_tailor()` generic (#292).
Expand Down
5 changes: 3 additions & 2 deletions R/blueprint-recipe-default.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@ mold_recipe_default_process <- function(
training <- NULL
}

blueprint$recipe$strings_as_factors <- blueprint_strings_as_factors(blueprint)

# Prep for predictors and outcomes
recipe <- recipes::prep(
blueprint$recipe,
training = training,
fresh = blueprint$fresh,
strings_as_factors = blueprint_strings_as_factors(blueprint)
fresh = blueprint$fresh
)
blueprint <- update_blueprint0(blueprint, recipe = recipe)

Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/_snaps/print.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@

Code
mold(recipes::recipe(Species ~ Sepal.Length, iris), iris)$blueprint
Condition
Warning:
The `strings_as_factors` argument of `prep.recipe()` is deprecated as of recipes 1.3.0.
i Please use the `strings_as_factors` argument of `recipe()` instead.
Message
Recipe blueprint:
# Predictors: 1
Expand Down