From 2589bb2ff40c136835bb700272d7703382dd9d24 Mon Sep 17 00:00:00 2001 From: Emily de la Rua <59304861+edelarua@users.noreply.github.com> Date: Fri, 27 Oct 2023 12:41:53 -0400 Subject: [PATCH] Improve documentation of `whiskers` param in `g_lineplot` (#1110) Part of https://github.com/insightsengineering/teal.modules.clinical/issues/350 --- R/g_lineplot.R | 10 ++++++---- man/g_lineplot.Rd | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/R/g_lineplot.R b/R/g_lineplot.R index 6ccba9aba3..c3f838436f 100644 --- a/R/g_lineplot.R +++ b/R/g_lineplot.R @@ -21,10 +21,12 @@ #' and be of a `double` or `numeric` type vector of length one. #' @param interval (`character` or `NULL`)\cr names of the statistics that will be plotted as intervals. #' All the statistics indicated in `interval` variable must be present in the object returned by `sfun`, -#' and be of a `double` or `numeric` type vector of length two. -#' @param whiskers (`character`)\cr names of the interval whiskers that will be plotted. Must match the `names` -#' attribute of the `interval` element in the list returned by `sfun`. It is possible to specify one whisker only, -#' lower or upper. +#' and be of a `double` or `numeric` type vector of length two. Set `interval = NULL` if intervals should not be +#' added to the plot. +#' @param whiskers (`character`)\cr names of the interval whiskers that will be plotted. Names must match names +#' of the list element `interval` that will be returned by `sfun` (e.g. `mean_ci_lwr` element of +#' `sfun(x)[["mean_ci"]]`). It is possible to specify one whisker only, or to suppress all whiskers by setting +#' `interval = NULL`. #' @param table (`character` or `NULL`)\cr names of the statistics that will be displayed in the table below the plot. #' All the statistics indicated in `table` variable must be present in the object returned by `sfun`. #' @param sfun (`closure`)\cr the function to compute the values of required statistics. It must return a named `list` diff --git a/man/g_lineplot.Rd b/man/g_lineplot.Rd index 5bdedee593..f14c9a4b93 100644 --- a/man/g_lineplot.Rd +++ b/man/g_lineplot.Rd @@ -59,11 +59,13 @@ and be of a \code{double} or \code{numeric} type vector of length one.} \item{interval}{(\code{character} or \code{NULL})\cr names of the statistics that will be plotted as intervals. All the statistics indicated in \code{interval} variable must be present in the object returned by \code{sfun}, -and be of a \code{double} or \code{numeric} type vector of length two.} +and be of a \code{double} or \code{numeric} type vector of length two. Set \code{interval = NULL} if intervals should not be +added to the plot.} -\item{whiskers}{(\code{character})\cr names of the interval whiskers that will be plotted. Must match the \code{names} -attribute of the \code{interval} element in the list returned by \code{sfun}. It is possible to specify one whisker only, -lower or upper.} +\item{whiskers}{(\code{character})\cr names of the interval whiskers that will be plotted. Names must match names +of the list element \code{interval} that will be returned by \code{sfun} (e.g. \code{mean_ci_lwr} element of +\code{sfun(x)[["mean_ci"]]}). It is possible to specify one whisker only, or to suppress all whiskers by setting +\code{interval = NULL}.} \item{table}{(\code{character} or \code{NULL})\cr names of the statistics that will be displayed in the table below the plot. All the statistics indicated in \code{table} variable must be present in the object returned by \code{sfun}.}