fix bugs
[talweg.git] / pkg / R / J_Zero.R
CommitLineData
102bcfda
BA
1#' getZeroJumpPredict
2#'
8f5671db 3#' "Reset level to 0": jump by -A where A is the last observed value.
e030a6e3 4#'
99f83c9a 5#' @inheritParams computeForecast
e030a6e3
BA
6#' @param today Index of the current day (predict tomorrow)
7#' @param params Optional parameters computed by the main forecaster
546b0cb6 8#'
3ddf1c12 9#' @aliases J_Zero
102bcfda 10#'
a3344f75 11getZeroJumpPredict = function(data, today, memory, predict_from, horizon, params, ...)
e030a6e3 12{
8f5671db
BA
13 list(...)$first_pred - ifelse( predict_from >= 2,
14 data$getSerie(today)[predict_from-1], tail(data$getSerie(today-1),1) )
e030a6e3 15}