From 3385fbce71a7eb82bad53c8ced6c3463dc7c9a87 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Wed, 18 Sep 2024 09:14:24 -0500 Subject: [PATCH] allow prediction column named `.pred` --- R/adjust-numeric-range.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/adjust-numeric-range.R b/R/adjust-numeric-range.R index c82276b..c1fa60a 100644 --- a/R/adjust-numeric-range.R +++ b/R/adjust-numeric-range.R @@ -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