new version, persistence -7 days
[talweg.git] / R / Data.R
index a17e262..9b7db3f 100644 (file)
--- a/R/Data.R
+++ b/R/Data.R
@@ -29,8 +29,21 @@ Data = setRefClass(
                },
                getSize = function()
                {
+                       "Number of series in the dataset"
+
                        length(data)
                },
+               getStdHorizon = function()
+               {
+                       "'Standard' horizon, from t+1 to midnight"
+
+                       L1 = length(data[[1]]$serie)
+                       L2 = length(data[[2]]$serie)
+                       if (L1 < L2)
+                               L2 - L1
+                       else
+                               L1
+               },
                append = function(new_time, new_serie, new_level, new_exo_hat, new_exo_Dm1)
                {
                        "Acquire a new vector of lists (time, serie, level, exo_hat, exo_Dm1)"