X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2FF_Persistence.R;h=39e043ca3a12e35ece6e19de4b04d72f690ea869;hp=19cf2e410e3e255ddabcc57326321cc1ef510679;hb=25b75559e2d9bf84e2de35b851d93fefdae36e17;hpb=66877df35f2fc9561728537c713c963230b0de45 diff --git a/pkg/R/F_Persistence.R b/pkg/R/F_Persistence.R index 19cf2e4..39e043c 100644 --- a/pkg/R/F_Persistence.R +++ b/pkg/R/F_Persistence.R @@ -1,18 +1,13 @@ #' @include Forecaster.R #' -#' @title Persistence Forecaster +#' Persistence Forecaster #' -#' @description Return the last centered (similar) day curve. -#' Inherits \code{\link{Forecaster}} -PersistenceForecaster = setRefClass( - Class = "PersistenceForecaster", - contains = "Forecaster", +#' Return the last centered (similar) day curve. +#' Inherits \code{\link{Forecaster}} +PersistenceForecaster = R6::R6Class("PersistenceForecaster", + inherit = "Forecaster", - methods = list( - initialize = function(...) - { - callSuper(...) - }, + public = list( predictShape = function(today, memory, horizon, ...) { # Return centered last (similar) day curve, avoiding NAs until memory is run