From 3979b8964dafbf9cdfb8c99f714fc325f1d474d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zxBIB=20Lech=C3=B3n=2CMiguel=20=28MED=20BDS=29=20EXTERNAL?= Date: Mon, 30 Sep 2024 11:03:32 +0200 Subject: [PATCH] Document recent changes. --- DESCRIPTION | 2 +- NEWS.md | 8 ++++++++ R/mod_lineplot.R | 26 ++++++++++++++++++++------ man/mod_lineplot.Rd | 24 ++++++++++++++++++++---- 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8f8101a..8ca463c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: dv.explorer.parameter Type: Package Title: Parameter exploration modules -Version: 0.0.8 +Version: 0.0.9 Authors@R: c( person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")), person(given = "Luis", family = "Moris Fernandez", role = c("aut", "cre"), email = "luis.moris.fernandez@gmail.com"), diff --git a/NEWS.md b/NEWS.md index da3b461..89ccad0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# dv.explorer.parameter 0.0.9 + +* lineplot: + * Y axis log projection menu option. + * New `cdisc_visit_vars` parameter that accounts for missing Study Day 0 in CDISC datasets. + * New `default_transparency_value` parameter. + * Remove support for data dispatchers in favor of dataset names. + # dv.explorer.parameter 0.0.8 * WFPHM: diff --git a/R/mod_lineplot.R b/R/mod_lineplot.R index 9160748..5ed715a 100644 --- a/R/mod_lineplot.R +++ b/R/mod_lineplot.R @@ -530,7 +530,16 @@ lp_median_summary_functions <- list( #' #' @param summary_functions `[list()]` #' -#' TODO: +#' Each element of this named list contains a summary function (e.g. a mean) and a collection of dispersion functions +#' (e.g. standard deviation) defining ranges around the values returned by the summary function. +#' +#' The structure of each element is then a named list with the following elements: +#' - `function`: Function that takes a numeric vector as its sole parameter and produces a scalar number. +#' - `dispersion`: Named list of pairs functions that return the *top* and *bottom* dispersion ranges. They also take +#' a numeric vector as input and return a single numeric scalar +#' - `y_prefix`: Prefix that will be prepended the Y axis label of the generated plot +#' +#' For an example, see `dv.explorer.parameter::lp_mean_summary_functions`. #' #' @param dataset_name `[shiny::reactive(*)]` #' @@ -568,6 +577,14 @@ lp_median_summary_functions <- list( #' #' Default values for the selectors #' +#' @param default_y_axis_projection `[character(1)|NULL]` +#' +#' Default values for the selectors +#' +#' @param default_transparency `[numeric(1)]` +#' +#' Default values for the selectors +#' #' @export #' lineplot_server <- function(id, @@ -1471,9 +1488,6 @@ lineplot_server <- function(id, #' #' Dataset names #' -#' @param bm_dataset_disp,group_dataset_disp `[mm_dispatcher(1)]` -#' module manager dispatchers that used as `bm_dataset` and `group_dataset` to `lineplot_server` -#' #' @param receiver_id `[character(1)]` #' #' Name of the module receiving the selected subject ID in the single subject listing. The name must be present in @@ -1521,7 +1535,7 @@ mod_lineplot <- function(module_id, # NOTE(miguel): These two lines allow the caller to provide lists whenever `mod_patient_profile_server` # requires atomic arrays - args <- T_honor_as_array_flag(mod_patient_profile_API, args) + args <- T_honor_as_array_flag(mod_lineplot_API, args) list2env(args[setdiff(seq_along(args), 1)], environment()) # overwrite current arguments with modified `args` mod <- list( @@ -1613,4 +1627,4 @@ mod_lineplot <- function(module_id, module_id = module_id ) return(mod) -} +} \ No newline at end of file diff --git a/man/mod_lineplot.Rd b/man/mod_lineplot.Rd index 128a949..cb73fe4 100644 --- a/man/mod_lineplot.Rd +++ b/man/mod_lineplot.Rd @@ -96,7 +96,18 @@ A reactive that indicates a possible change in the column structure of any of th \item{summary_functions}{\verb{[list()]} -TODO:} +Each element of this named list contains a summary function (e.g. a mean) and a collection of dispersion functions +(e.g. standard deviation) defining ranges around the values returned by the summary function. + +The structure of each element is then a named list with the following elements: +\itemize{ +\item \code{function}: Function that takes a numeric vector as its sole parameter and produces a scalar number. +\item \code{dispersion}: Named list of pairs functions that return the \emph{top} and \emph{bottom} dispersion ranges. They also take +a numeric vector as input and return a single numeric scalar +\item \code{y_prefix}: Prefix that will be prepended the Y axis label of the generated plot +} + +For an example, see \code{dv.explorer.parameter::lp_mean_summary_functions}} \item{subjid_var}{\verb{[character(1)]} @@ -130,6 +141,14 @@ Default values for the selectors} Default values for the selectors} +\item{default_transparency}{\verb{[numeric(1)]} + +Default values for the selectors} + +\item{default_y_axis_projection}{\verb{[character(1)|NULL]} + +Default values for the selectors} + \item{module_id}{Shiny ID \verb{[character(1)]} Module identifier} @@ -142,9 +161,6 @@ Dataset names} Name of the module receiving the selected subject ID in the single subject listing. The name must be present in the module list or NULL.} - -\item{bm_dataset_disp, group_dataset_disp}{\verb{[mm_dispatcher(1)]} -module manager dispatchers that used as \code{bm_dataset} and \code{group_dataset} to \code{lineplot_server}} } \description{ Display line plots of raw or summary data over time. Summaries include measures of central tendency