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

Fix for legacy recipes in bake.step_log() method #1285

Merged
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: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

## Bug Fixes

* Fixed bug where `step_log()` breaks legacy recipe objects by indexing `names(object)` in `bake()`. (@stufield, #1284)

* Fixed bug where `step_factor2string()` if `strings_as_factors = TRUE` is set in `prep()`. (#317)

* Fixed bug where `tidy.step_cut()` always returned zero row tibbles for trained recipes. (#1229)
Expand Down
3 changes: 2 additions & 1 deletion R/log.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ prep.step_log <- function(x, training, info = NULL, ...) {

#' @export
bake.step_log <- function(object, new_data, ...) {
col_names <- names(object$columns)
# For backward compatibility #1284
col_names <- names(object$columns) %||% object$columns
check_new_data(col_names, object, new_data)

# for backward compat
Expand Down
Loading