1 # HACK for test reports: complete some days with a few NAs, for nicer graphics
2 nas_in_serie = is.na(data$getSerie(today))
5 if (sum(nas_in_serie) >= length(nas_in_serie) / 2)
7 for (i in seq_along(nas_in_serie))
13 while (left>=1 && nas_in_serie[left])
17 while (right<=length(nas_in_serie) && nas_in_serie[right])
19 #HACK: modify by-reference Data object...
20 data$data[[today]]$serie[i] <<-
21 if (left==0) data$data[[today]]$serie[right]
22 else if (right==0) data$data[[today]]$serie[left]
23 else (data$data[[today]]$serie[left] + data$data[[today]]$serie[right]) / 2.