X-Git-Url: https://git.auder.net/images/pieces/%22%20%20%20VariantRules.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=pkg%2FR%2FF_Zero.R;h=4f57ba2ae947f9c6a6c0483750e0e8c12c354b09;hb=6d50a76fc27236cb056a479be395ebe467666c8b;hp=247ab049def79dd8dd6b35f2e406be99704ecec6;hpb=469529710f56c790ae932b45d13fed2e34bcabf2;p=talweg.git diff --git a/pkg/R/F_Zero.R b/pkg/R/F_Zero.R index 247ab04..4f57ba2 100644 --- a/pkg/R/F_Zero.R +++ b/pkg/R/F_Zero.R @@ -1,20 +1,13 @@ #' @include Forecaster.R #' -#' @title Zero Forecaster +#' Zero Forecaster #' -#' @description Return 0 (and then adjust). Inherits \code{\link{Forecaster}} -ZeroForecaster = setRefClass( - Class = "ZeroForecaster", - contains = "Forecaster", +#' Return 0 (and then adjust). Inherits \code{\link{Forecaster}} +ZeroForecaster = R6::R6Class("ZeroForecaster", + inherit = Forecaster, - methods = list( - initialize = function(...) - { - callSuper(...) - }, - predictShape = function(today, memory, horizon, ...) - { + public = list( + predictShape = function(data, today, memory, horizon, ...) rep(0., horizon) - } ) )