- # NOTE: if predict_at does not cut days at midnight,
- # for the exogenous to be synchronized they need to be shifted
- if (predict_at > 0)
- {
- exo_hat = as.data.frame(exo_df[max(1,i-1),(1+nb_exos+1):(1+2*nb_exos)])
- exo_Dm1 = if (i>=3) as.data.frame(exo_df[i-1,2:(1+nb_exos)]) else NA
- } else
- {
- exo_hat = as.data.frame(exo_df[i,(1+nb_exos+1):(1+2*nb_exos)])
- exo_Dm1 = if (i>=2) as.data.frame(exo_df[i-1,2:(1+nb_exos)]) else NA
- }
+ # TODO: 2 modes, "operational" and "testing"; would need PM10 predictions
+ data$append(time=time, value=serie, level_hat=mean(serie,na.rm=TRUE),
+ exo=exo_df[i,2:(1+nb_exos)], exo_hat=exo_df[i,(1+nb_exos+1):(1+2*nb_exos)])
+ if (i >= limit)
+ break