X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2Fplot.R;h=48b456cd1bebfff91a227a79c3ff0797af5f1199;hp=5ea4843fe96e6808661c0e79fe2639521f6b8cad;hb=102bcfda4afbb5cfee885cbee0f55545624168fd;hpb=c4c329f65e6e842917cdfbabff36fbca6a617d02 diff --git a/pkg/R/plot.R b/pkg/R/plot.R index 5ea4843..48b456c 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -1,8 +1,8 @@ #' Plot curves #' -#' Plot a range of curves in data +#' Plot a range of curves in data. #' -#' @param data Object of class Data +#' @inheritParams computeError #' @param indices Range of indices (integers or dates) #' #' @export @@ -22,9 +22,9 @@ plotCurves <- function(data, indices=seq_len(data$getSize())) #' Plot error #' -#' Draw error graphs, potentially from several runs of \code{computeForecast} +#' Draw error graphs, potentially from several runs of \code{computeForecast()}. #' -#' @param err Error as returned by \code{computeError} +#' @param err Error as returned by \code{computeError()} #' @param cols Colors for each error (default: 1,2,3,...) #' #' @seealso \code{\link{plotCurves}}, \code{\link{plotPredReal}}, @@ -74,10 +74,9 @@ plotError <- function(err, cols=seq_along(err)) #' Plot measured / predicted #' -#' Plot measured curve (in black) and predicted curve (in blue) +#' Plot measured curve (in black) and predicted curve (in blue). #' -#' @param data Object return by \code{getData} -#' @param pred Object as returned by \code{computeForecast} +#' @inheritParams computeError #' @param index Index in forecasts (integer or date) #' #' @export @@ -95,9 +94,9 @@ plotPredReal <- function(data, pred, index) #' Plot similarities #' -#' Plot histogram of similarities (weights) +#' Plot histogram of similarities (weights), for 'Neighbors' method. #' -#' @param pred Object as returned by \code{computeForecast} +#' @inheritParams computeError #' @param index Index in forecasts (integer or date) #' #' @export @@ -112,10 +111,10 @@ plotSimils <- function(pred, index) #' Functional boxplot #' -#' Draw the functional boxplot on the left, and bivariate plot on the right +#' Draw the functional boxplot on the left, and bivariate plot on the right. #' -#' @param data Object return by \code{getData} -#' @param indices integer or date indices to process +#' @inheritParams computeError +#' @inheritParams plotCurves #' #' @export plotFbox <- function(data, indices=seq_len(data$getSize())) @@ -138,10 +137,10 @@ plotFbox <- function(data, indices=seq_len(data$getSize())) #' Compute filaments #' -#' Get similar days in the past, as black as distances are small +#' Obtain similar days in the past, and (optionally) plot them -- as black as distances +#' are small. #' -#' @param data Object as returned by \code{getData} -#' @param pred Object of class Forecast +#' @inheritParams computeError #' @param index Index in forecast (integer or date) #' @param limit Number of neighbors to consider #' @param plot Should the result be plotted? @@ -197,9 +196,9 @@ computeFilaments <- function(data, pred, index, limit=60, plot=TRUE) #' Functional boxplot on filaments #' -#' Draw the functional boxplot on filaments obtained by \code{computeFilaments} +#' Draw the functional boxplot on filaments obtained by \code{computeFilaments()}. #' -#' @param data Object return by \code{getData} +#' @inheritParams computeError #' @param fil Output of \code{computeFilaments} #' #' @export @@ -227,10 +226,10 @@ plotFilamentsBox = function(data, fil) #' Plot relative conditional variability / absolute variability #' #' Draw the relative conditional variability / absolute variability based on filaments -#' obtained by \code{computeFilaments} +#' obtained by \code{computeFilaments()}. #' -#' @param data Object return by \code{getData} -#' @param fil Output of \code{computeFilaments} +#' @inheritParams computeError +#' @inheritParams plotFilamentsBox #' #' @export plotRelVar = function(data, fil)