Skip to content

Commit

Permalink
allow prediction column named .pred
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 18, 2024
1 parent 9383acd commit 3385fbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/adjust-numeric-range.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ predict.numeric_range <- function(object, new_data, tailor, ...) {
}

rename_prediction_column <- function(data, est_nm) {
if (identical(est_nm, ".pred")) {
return(data)
}
data[[".pred"]] <- data[[est_nm]]
data[[est_nm]] <- NULL
data
Expand Down

0 comments on commit 3385fbc

Please sign in to comment.