X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2FJ_Neighbors.R;h=7ca00035bdbd0c6a39797e6d28540a9b560b2d98;hb=ee8b1b4e3c13f8dcf13a2c8da6a3bef1520c8252;hp=33ba00d1dbad97d5405b9854b0ec8eb2d7eae514;hpb=99f83c9af27492f6fb9b10f51fb8704ed588f5c1;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]