X-Git-Url: https://git.auder.net/?p=morpheus.git;a=blobdiff_plain;f=pkg%2FR%2Fplot.R;fp=pkg%2FR%2Fplot.R;h=da8f8bfd2a1189e88a32e986f5fcca7b59cfc363;hp=da4fae53ac60504af51ca7b65be81a3df34c825b;hb=ab35f6102896a49e86e853262c0650faa2931638;hpb=4b2f17bb108bab0f263619cfe00eabfb1e9b8860 diff --git a/pkg/R/plot.R b/pkg/R/plot.R index da4fae5..da8f8bf 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -22,6 +22,8 @@ #' #' Plot compared histograms of a single parameter (scalar) #' +#' @name plotHist +#' #' @param mr Output of multiRun(), list of lists of functions results #' @param x Row index of the element inside the aggregated parameter #' @param y Column index of the element inside the aggregated parameter @@ -41,7 +43,7 @@ plotHist <- function(mr, x, y, ...) { params <- .extractParam(mr, x, y) - L = length(params) + L <- length(params) # Plot histograms side by side par(mfrow=c(1,L), cex.axis=1.5, cex.lab=1.5, mar=c(4.7,5,1,1)) args <- list(...) @@ -53,11 +55,18 @@ plotHist <- function(mr, x, y, ...) } } +# NOTE: roxygen2 bug, "@inheritParams plotHist" fails in next header: + #' plotBox #' #' Draw compared boxplots of a single parameter (scalar) #' -#' @inheritParams plotHist +#' @name plotBox +#' +#' @param mr Output of multiRun(), list of lists of functions results +#' @param x Row index of the element inside the aggregated parameter +#' @param y Column index of the element inside the aggregated parameter +#' @param ... Additional graphical parameters (xlab, ylab, ...) #' #' @examples #' \donttest{ @@ -73,7 +82,7 @@ plotHist <- function(mr, x, y, ...) plotBox <- function(mr, x, y, ...) { params <- .extractParam(mr, x, y) - L = length(params) + L <- length(params) # Plot boxplots side by side par(mfrow=c(1,L), cex.axis=1.5, cex.lab=1.5, mar=c(4.7,5,1,1)) args <- list(...) @@ -91,6 +100,8 @@ plotBox <- function(mr, x, y, ...) #' Note that the drawing does not correspond to a function; it is just a #' convenient way to visualize the estimated parameters. #' +#' @name plotCoefs +#' #' @param mr List of parameters matrices #' @param params True value of the parameters matrix #' @param ... Additional graphical parameters