on the way back without realtime
[talweg.git] / pkg / R / J_Persistence.R
index 5d156cc..a85a42a 100644 (file)
@@ -13,7 +13,7 @@ getPersistenceJumpPredict = function(data, today, memory, horizon, params, ...)
        {
                {
                        last_serie_end = tail( data$getSerie(index), 1)
-                       last_tomorrow_begin = data$getSerie(index+1)[1]
+                       last_tomorrow_begin = head( data$getSerie(index+1), 1)
                        index = index - ifelse(same_day,7,1)
                };
                if (!is.na(last_serie_end) && !is.na(last_tomorrow_begin))