diff --git a/R/data_rescale.R b/R/data_rescale.R index 25a5c4316..04646a9d9 100644 --- a/R/data_rescale.R +++ b/R/data_rescale.R @@ -317,9 +317,7 @@ rescale.data.frame <- function(x, } # multiply? If yes, calculate the "add" value if (!is.null(multiply)) { - x_range <- range(x, na.rm = TRUE) - x_diff <- diff(x_range) - add <- x_diff * (multiply - 1) + add <- diff(range(x, na.rm = TRUE)) * (multiply - 1) } # add? if (!is.null(add)) {