X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2FR%2Fplot.R;h=c8f7792cb05be2c4215bd93da8fac016b0b6e1ed;hb=af3b84f4cacade7d83221ca0249b546c50ddf340;hp=5cb55b0099f4878edb3da7ec44a9004bcc858711;hpb=99f83c9af27492f6fb9b10f51fb8704ed588f5c1;p=talweg.git diff --git a/pkg/R/plot.R b/pkg/R/plot.R index 5cb55b0..c8f7792 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -1,6 +1,6 @@ -#' @title plot curves +#' plot curves #' -#' @description Plot a range of curves in data +#' Plot a range of curves in data #' #' @param data Object of class Data #' @param indices Range of indices (integers or dates) @@ -24,9 +24,9 @@ plotCurves <- function(data, indices=seq_len(data$getSize())) } } -#' @title plot measured / predicted +#' plot measured / predicted #' -#' @description Plot measured curve (in black) and predicted curve (in red) +#' Plot measured curve (in black) and predicted curve (in red) #' #' @param data Object return by \code{getData} #' @param pred Object as returned by \code{computeForecast} @@ -44,9 +44,9 @@ plotPredReal <- function(data, pred, index) plot(pred$getSerie(index), type="l", col="#0000FF", ylim=yrange, xlab="", ylab="") } -#' @title Compute filaments +#' Compute filaments #' -#' @description Get similar days in the past + "past tomorrow", as black as distances are small +#' Get similar days in the past + "past tomorrow", as black as distances are small #' #' @param data Object as returned by \code{getData} #' @param index Index in data @@ -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))