X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2Fplot.R;h=9a7a1ee55181c14704a1cf59f587d22a7ca6944b;hb=25b75559e2d9bf84e2de35b851d93fefdae36e17;hp=e4147986d6432dae8733be59cf01a947f44b3cea;hpb=16b1c049a9c402544d7076cacfe6b00a3785b51f;p=talweg.git diff --git a/pkg/R/plot.R b/pkg/R/plot.R index e414798..9a7a1ee 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -8,12 +8,12 @@ #' @export plotCurves <- function(data, indices=seq_len(data$getSize())) { - yrange = quantile( range( sapply( indices, function(i) { + yrange = quantile( sapply( indices, function(i) { serie = c(data$getCenteredSerie(i)) if (!all(is.na(serie))) range(serie, na.rm=TRUE) c() - }) ), probs=c(0.05,0.95) ) + }), probs=c(0.05,0.95) ) par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5) for (i in seq_along(indices)) { @@ -29,7 +29,7 @@ plotCurves <- function(data, indices=seq_len(data$getSize())) #' @description Plot measured curve (in black) and predicted curve (in red) #' #' @param data Object return by \code{getData} -#' @param pred Object as returned by \code{getForecast} +#' @param pred Object as returned by \code{computeForecast} #' @param index Index in forecasts #' #' @export @@ -63,21 +63,19 @@ computeFilaments <- function(data, index, limit=60, plot=TRUE) L = length(ref_serie) # Determine indices of no-NAs days followed by no-NAs tomorrows - first_day = ifelse(length(data$getCenteredSerie(1))