X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2FJ_Neighbors.R;h=7ca00035bdbd0c6a39797e6d28540a9b560b2d98;hb=eef545170c5a76b710184db6b695c15b20759177;hp=33ba00d1dbad97d5405b9854b0ec8eb2d7eae514;hpb=ff5df8e310b73883565761ab4b1aa5a0672e9f27;p=talweg.git diff --git a/pkg/R/J_Neighbors.R b/pkg/R/J_Neighbors.R index 33ba00d..7ca0003 100644 --- a/pkg/R/J_Neighbors.R +++ b/pkg/R/J_Neighbors.R @@ -2,10 +2,11 @@ #' #' @inheritParams computeForecast #' @inheritParams getZeroJumpPredict +#' getNeighborsJumpPredict = function(data, today, memory, horizon, params, ...) { first_day = max(1, today-memory) - filter = params$indices >= first_day + filter = (params$indices >= first_day) indices = params$indices[filter] weights = params$weights[filter]