Initial commit
[talweg.git] / R / D_Persistence.R
1 #' Obtain delta forecast by the Persistence method
2 #'
3 #' @inheritParams getForecast
4 #' @inheritParams getZeroDeltaForecast
5 getPersistenceDeltaForecast = function(data, today, memory, horizon, shape_params, ...)
6 {
7 # Return level of last similar "tomorrow" (thus -6) computed on "horizon"
8 data$getSerie(today-6)[1] - tail(data$getSerie(today-7), 1)
9 }