a few fixes
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 25 Apr 2017 12:36:14 +0000 (14:36 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 25 Apr 2017 12:36:14 +0000 (14:36 +0200)
pkg/R/plot.R
reports/Experiments.gj

index ad0ed4e..2cfaf36 100644 (file)
@@ -208,8 +208,9 @@ plotFilamentsBox = function(data, fil, predict_from)
                stop("Functional boxplot requires the rainbow package")
 
        series_matrix = rbind(
-               data$getSeries(fil$neighb_indices), data$getSeries(fil$neighb_indices+1) )
+               data$getSeries(fil$neighb_indices-1), data$getSeries(fil$neighb_indices) )
        series_fds = rainbow::fds(seq_len(nrow(series_matrix)), series_matrix)
+
        par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5)
        rainbow::fboxplot(series_fds, "functional", "hdr", xlab="Time (hours)", ylab="PM10",
                plotlegend=FALSE, lwd=2)
@@ -234,8 +235,8 @@ plotFilamentsBox = function(data, fil, predict_from)
 #' @export
 plotRelVar = function(data, fil, predict_from)
 {
-       ref_var = c( apply(data$getSeries(fil$neighb_indices),1,sd),
-               apply(data$getSeries(fil$neighb_indices+1),1,sd) )
+       ref_var = c( apply(data$getSeries(fil$neighb_indices-1),1,sd),
+               apply(data$getSeries(fil$neighb_indices),1,sd) )
        tdays = .getNoNA2(data, 2, fil$index)
        global_var = c(
                apply(data$getSeries(tdays-1),1,sd),
index d7ade40..9fd7af7 100644 (file)
@@ -189,7 +189,7 @@ plotRelVar(data, f_np1, predict_from=P); title(paste("StdDev p1 day",i_np))
 plotRelVar(data, f_p1, predict_from=P); title(paste("StdDev p1 day",i_p))
 
 plotRelVar(data, f_np2, predict_from=P); title(paste("StdDev p2 day",i_np))
-plotRelVar(data, f_p2, preidct_from=P); title(paste("StdDev p2 day",i_p))
+plotRelVar(data, f_p2, predict_from=P); title(paste("StdDev p2 day",i_p))
 
 # Variabilité globale en rouge ; sur les voisins (+ lendemains) en noir
 -----