#'
#' @export
Data = R6Class("Data",
+ private = list(
+ .data = "list"
+ ),
public = list(
- data = "list",
initialize = function(...)
- {
- "Initialize empty Data object"
-#TODO: continue from here
- callSuper(...)
- },
+ initialize(self, private, ...)
+ ,
getSize = function()
- {
- "Number of series in the dataset"
-
- length(data)
- },
+ getSize()
+ ,
getStdHorizon = function()
- {
- "'Standard' horizon, from t+1 to midnight"
-
- 24 - as.POSIXlt( data[[1]]$time[1] )$hour + 1
- },
+ getStdHorizon(self, private)
+ ,
append = function(new_time, new_serie, new_level, new_exo_hat, new_exo)
- {
- "Acquire a new vector of lists (time, serie, level, exo_hat, exo)"
+ append(self, private,
data[[length(data)+1]] <<- list("time"=new_time,"serie"=new_serie,"level"=new_level,
"exo_hat"=new_exo_hat,"exo"=new_exo)
}
)
)
+
+#' Initialize empty Data object
+initialize = function(self, private, ...)
+{
+ invisible(self)
+}
+
+#' Number of series in the dataset
+getSize = function(self, private)
+ length(private$.data)
+
+#' 'Standard' horizon, from t+1 to midnight
+getStdHorizon = function(self, private)
+ 24 - as.POSIXlt( private$.data[[1]]$time[1] )$hour + 1
+
+#' Acquire a new vector of lists (time, centered_serie, level, exo, exo_hat)