+ }
+ }
+ if (!opera)
+ {
+ # The same, in the future
+ index <- today
+ repeat
+ {
+ index = index + 7
+ if (index > data$getSize())
+ break
+ serie_on_horizon = data$getCenteredSerie(index)[predict_from:horizon]
+ if (!any(is.na(serie_on_horizon)))
+ {
+ avg = avg + serie_on_horizon
+ nb_no_na_series = nb_no_na_series + 1
+ }
+ }