Skip to content

Commit

Permalink
Removed unused object in forecast.mdl_df
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Mar 10, 2019
1 parent 60271f9 commit 148dcc0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ forecast.model <- function(object, new_data = NULL, h = NULL, bias_adjust = TRUE
specials <- parse_model_rhs(object$model)$specials
object$model$remove_data()


# Compute forecasts
fc <- forecast(object$fit, new_data, specials = specials, ...)

Expand All @@ -66,9 +67,6 @@ forecast.model <- function(object, new_data = NULL, h = NULL, bias_adjust = TRUE
}
fc[["dist"]] <- update_fcdist(fc[["dist"]], transformation = bt)

new_h <- units_since(new_data[[as_string(index(new_data))]])/time_unit(interval(new_data)) -
units_since(max(object$index[[as_string(index(object$index))]]))/time_unit(interval(new_data))

out <- mutate(new_data,
!!expr_text(object$response) := fc[["point"]],
.distribution = fc[["dist"]])
Expand Down

0 comments on commit 148dcc0

Please sign in to comment.