Fix R6 classes
[talweg.git] / pkg / R / Forecaster.R
index 2bd2e4e..47160b5 100644 (file)
@@ -19,7 +19,7 @@
 #'   {Predict a new shape of \code{horizon} values at day index \code{today} using \code{memory}
 #'   days in the past.}
 #' \item{\code{getParameters()}}
-#'   {Return (internal) parameters.} }
+#'   {Return (internal) parameters.}}
 Forecaster = R6::R6Class("Forecaster",
        private = list(
                .params = list(),
@@ -36,13 +36,13 @@ Forecaster = R6::R6Class("Forecaster",
                predictSerie = function(today, memory, horizon, ...)
                {
                        # Parameters (potentially) computed during shape prediction stage
-                       predicted_shape = o$predictShape(today, memory, horizon, ...)
+                       predicted_shape = self$predictShape(today, memory, horizon, ...)
                        predicted_delta = private$.pjump(private$.data,today,memory,horizon,private$.params,...)
                        # Predicted shape is aligned it on the end of current day + jump
                        predicted_shape+tail(private$.data$getSerie(today),1)-predicted_shape[1]+predicted_delta
                },
                predictShape = function(today, memory, horizon, ...)
-                       #empty default implementation: to implement in inherited classes
+                       NULL #empty default implementation: to implement in inherited classes
                ,
                getParameters = function()
                        private$.params