From b1cf9394dba85bc0c6056da5e4d3e85ca0cb92ce Mon Sep 17 00:00:00 2001 From: Dorchies David <david.dorchies@irstea.fr> Date: Thu, 3 Mar 2022 12:45:34 +0100 Subject: [PATCH] docs: improvments asked by CRAN team on value sections. Refs #71 --- R/RunModel.GRiwrmInputsModel.R | 2 +- R/RunModel.InputsModel.R | 6 ++++++ R/UpdateQsimUpstream.R | 2 +- R/plot.GRiwrm.R | 2 +- R/plot.GRiwrmOutputsModel.R | 2 +- R/plot.Qm3s.R | 2 ++ man/RunModel.GRiwrmInputsModel.Rd | 2 +- man/RunModel.InputsModel.Rd | 10 ++++++++++ man/plot.GRiwrm.Rd | 2 +- man/plot.GRiwrmOutputsModel.Rd | 2 +- man/plot.Qm3s.Rd | 3 +++ 11 files changed, 28 insertions(+), 7 deletions(-) diff --git a/R/RunModel.GRiwrmInputsModel.R b/R/RunModel.GRiwrmInputsModel.R index 01d7f3d..12ce0f7 100644 --- a/R/RunModel.GRiwrmInputsModel.R +++ b/R/RunModel.GRiwrmInputsModel.R @@ -5,7 +5,7 @@ #' @param Param [list] parameter values. The list item names are the IDs of the sub-basins. Each item is a [numeric] [vector] #' @param ... Further arguments for compatibility with S3 methods #' -#' @return [[list] of class \emph{GRiwrmOutputsModel}] list of \emph{OutputsModel} objects (See \[airGR::RunModel]) for each node of the semi-distributed model +#' @return A object of class \emph{GRiwrmOutputsModel}. This object is a [list] of *OutputsModel* objects produced by [RunModel.InputsModel] for each node of the semi-distributed model. #' @export #' @examples #' ################################################################### diff --git a/R/RunModel.InputsModel.R b/R/RunModel.InputsModel.R index 7ed3906..d64876a 100644 --- a/R/RunModel.InputsModel.R +++ b/R/RunModel.InputsModel.R @@ -1,9 +1,15 @@ #' Wrapper for [airGR::RunModel] for one sub-basin #' +#' @details This function calls [airGR::RunModel] (See [airGR::RunModel] for further details). +#' +#' The list produced by the function (See Value section of [airGR::RunModel_GR4J]) is here completed by an item *$Qsim_m3* storing the simulated discharge series in m3/s. +#' #' @inheritParams airGR::RunModel #' @param x \[object of class \emph{InputsModel}\] see [airGR::CreateInputsModel] for details #' @param ... Further arguments for compatibility with S3 methods #' +#' @inherit airGR::RunModel return return +#' #' @export RunModel.InputsModel <- function(x, RunOptions, Param, FUN_MOD = NULL, ...) { if(is.null(FUN_MOD)) { diff --git a/R/UpdateQsimUpstream.R b/R/UpdateQsimUpstream.R index 6fd986b..3afa52d 100644 --- a/R/UpdateQsimUpstream.R +++ b/R/UpdateQsimUpstream.R @@ -7,7 +7,7 @@ #' @description This function is used by [RunModel.GRiwrmInputsModel] and [Calibration.GRiwrmInputsModel] #' in order to provide upstream simulated flows to a node. #' -#' @return `InputsModel` object with updated `Qupstream` +#' @return `InputsModel` object with updated `Qupstream` (See [airGR::CreateInputsModel] for the detail of the object). #' @noRd #' UpdateQsimUpstream <- function(InputsModel, Runoptions, OutputsModel) { diff --git a/R/plot.GRiwrm.R b/R/plot.GRiwrm.R index 8a6aaa2..a35a422 100644 --- a/R/plot.GRiwrm.R +++ b/R/plot.GRiwrm.R @@ -10,7 +10,7 @@ #' @details This function only works inside RStudio because the HTMLwidget produced by DiagrammeR #' is not handled on some platforms #' -#' @return Mermaid code of the diagram if display is `FALSE`. +#' @return Mermaid code of the diagram if display is `FALSE`, otherwise the function returns the diagram itself. #' #' @export #' diff --git a/R/plot.GRiwrmOutputsModel.R b/R/plot.GRiwrmOutputsModel.R index 8175300..cbd0345 100644 --- a/R/plot.GRiwrmOutputsModel.R +++ b/R/plot.GRiwrmOutputsModel.R @@ -6,7 +6,7 @@ #' by hydrological model output named with the node ID (See [CreateGRiwrm] for details) #' @param ... Further arguments for [airGR::plot.OutputsModel] and [plot] #' -#' @return [list] of plots +#' @return [list] of plots. #' #' @importFrom graphics plot par title #' @export diff --git a/R/plot.Qm3s.R b/R/plot.Qm3s.R index aa40627..feb05ae 100644 --- a/R/plot.Qm3s.R +++ b/R/plot.Qm3s.R @@ -11,6 +11,8 @@ #' @param lty [character] or [numeric] The line type (See [par]) #' @param ... Further arguments to pass to the [matplot] functions #' +#' @return Screen plot window. +#' #' @importFrom grDevices rainbow #' @importFrom graphics matplot #' @export diff --git a/man/RunModel.GRiwrmInputsModel.Rd b/man/RunModel.GRiwrmInputsModel.Rd index 629450e..07a34b4 100644 --- a/man/RunModel.GRiwrmInputsModel.Rd +++ b/man/RunModel.GRiwrmInputsModel.Rd @@ -16,7 +16,7 @@ \item{...}{Further arguments for compatibility with S3 methods} } \value{ -[\link{list} of class \emph{GRiwrmOutputsModel}] list of \emph{OutputsModel} objects (See [airGR::RunModel]) for each node of the semi-distributed model +A object of class \emph{GRiwrmOutputsModel}. This object is a \link{list} of \emph{OutputsModel} objects produced by \link{RunModel.InputsModel} for each node of the semi-distributed model. } \description{ RunModel function for \emph{GRiwrmInputsModel} object diff --git a/man/RunModel.InputsModel.Rd b/man/RunModel.InputsModel.Rd index a1cf143..7f9e11c 100644 --- a/man/RunModel.InputsModel.Rd +++ b/man/RunModel.InputsModel.Rd @@ -17,6 +17,16 @@ \item{...}{Further arguments for compatibility with S3 methods} } +\value{ +[list] see \code{\link[airGR]{RunModel_GR4J}} or \code{\link[airGR]{RunModel_CemaNeigeGR4J}} for details. + +If \code{InputsModel} parameter has been created for using a semi-distributed (SD) lag model (See \code{\link[airGR]{CreateInputsModel}}), the list value contains an extra item named \code{QsimDown} which is a numeric series of simulated discharge [mm/time step] related to the run-off contribution of the downstream sub-catchment. +} \description{ Wrapper for \link[airGR:RunModel]{airGR::RunModel} for one sub-basin } +\details{ +This function calls \link[airGR:RunModel]{airGR::RunModel} (See \link[airGR:RunModel]{airGR::RunModel} for further details). + +The list produced by the function (See Value section of \link[airGR:RunModel_GR4J]{airGR::RunModel_GR4J}) is here completed by an item \emph{$Qsim_m3} storing the simulated discharge series in m3/s. +} diff --git a/man/plot.GRiwrm.Rd b/man/plot.GRiwrm.Rd index 98744d7..d34e846 100644 --- a/man/plot.GRiwrm.Rd +++ b/man/plot.GRiwrm.Rd @@ -27,7 +27,7 @@ \item{...}{Other arguments and parameters you would like to send to JavaScript (See \link[DiagrammeR:mermaid]{DiagrammeR::mermaid})} } \value{ -Mermaid code of the diagram if display is \code{FALSE}. +Mermaid code of the diagram if display is \code{FALSE}, otherwise the function returns the diagram itself. } \description{ Display of a diagram representing the network structure of a GRiwrm object diff --git a/man/plot.GRiwrmOutputsModel.Rd b/man/plot.GRiwrmOutputsModel.Rd index 42a99bf..f25a416 100644 --- a/man/plot.GRiwrmOutputsModel.Rd +++ b/man/plot.GRiwrmOutputsModel.Rd @@ -16,7 +16,7 @@ by hydrological model output named with the node ID (See \link{CreateGRiwrm} for \item{...}{Further arguments for \link[airGR:plot.OutputsModel]{airGR::plot.OutputsModel} and \link{plot}} } \value{ -\link{list} of plots +\link{list} of plots. } \description{ Function which creates screen plots giving an overview of the model outputs in the GRiwrm network diff --git a/man/plot.Qm3s.Rd b/man/plot.Qm3s.Rd index 4b84eb3..e09586e 100644 --- a/man/plot.Qm3s.Rd +++ b/man/plot.Qm3s.Rd @@ -38,6 +38,9 @@ \item{...}{Further arguments to pass to the \link{matplot} functions} } +\value{ +Screen plot window. +} \description{ Plot of a \code{Qm3s} object (time series of simulated flows) } -- GitLab