almost finished debug
[talweg.git] / pkg / R / F_Persistence.R
index 39e043c..ce02bd4 100644 (file)
@@ -5,7 +5,7 @@
 #' Return the last centered (similar) day curve.
 #' Inherits \code{\link{Forecaster}}
 PersistenceForecaster = R6::R6Class("PersistenceForecaster",
-       inherit = "Forecaster",
+       inherit = Forecaster,
 
        public = list(
                predictShape = function(today, memory, horizon, ...)
@@ -18,7 +18,7 @@ PersistenceForecaster = R6::R6Class("PersistenceForecaster",
                        repeat
                        {
                                {
-                                       last_serie = data$getCenteredSerie(index)[1:horizon]
+                                       last_serie = private$.data$getCenteredSerie(index)[1:horizon]
                                        index = index - ifelse(same_day,7,1)
                                };
                                if (!any(is.na(last_serie)))