From f7e50ec7faf6c41807fe6e0ce51339d399cc0a97 Mon Sep 17 00:00:00 2001 From: kartikeya kirar Date: Thu, 14 Mar 2024 19:05:48 +0530 Subject: [PATCH 1/2] 52 standardise optional notation (#231) part of https://github.com/insightsengineering/nestdevs-tasks/issues/52 - update Roxygen tags - standardise optional notation --------- Signed-off-by: kartikeya kirar Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com> --- R/optionalInput.R | 16 ++++++++-------- R/panel_group.R | 4 ++-- R/plot_with_settings.R | 20 ++++++++++---------- R/standard_layout.R | 6 +++--- R/table_with_settings.R | 4 ++-- R/utils.R | 2 +- man/extract_choices_labels.Rd | 2 +- man/optionalSelectInput.Rd | 6 +++--- man/optionalSliderInput.Rd | 4 ++-- man/optionalSliderInputValMinMax.Rd | 4 ++-- man/panel_item.Rd | 4 ++-- man/plot_suppress.Rd | 4 ++-- man/plot_with_settings.Rd | 20 ++++++++++---------- man/standard_layout.Rd | 4 ++-- man/table_with_settings.Rd | 4 ++-- 15 files changed, 52 insertions(+), 52 deletions(-) diff --git a/R/optionalInput.R b/R/optionalInput.R index a38f45c2..9263677d 100644 --- a/R/optionalInput.R +++ b/R/optionalInput.R @@ -13,13 +13,13 @@ #' A separator string to split the `choices` or `selected` inputs into the values of the different #' columns. #' -#' @param label_help (`shiny.tag` optional)\cr +#' @param label_help (`shiny.tag`) optional,\cr #' e.g. an object returned by [shiny::helpText()]. #' -#' @param fixed (`logical(1)` optional)\cr +#' @param fixed (`logical(1)`) optional,\cr #' whether to block user to select choices. #' -#' @param fixed_on_single (`logical(1)` optional)\cr +#' @param fixed_on_single (`logical(1)`) optional,\cr #' whether to block user to select a choice when there is only one or less choice. #' When `FALSE`, user is still able to select or deselect the choice. #' @@ -456,8 +456,8 @@ extract_raw_choices <- function(choices, sep) { #' input widgets that provide only a single choice. #' #' @inheritParams shiny::sliderInput -#' @param label_help (`shiny.tag`, optional)\cr -#' an object of class `shiny.tag`. E.g. an object returned by [shiny::helpText()] +#' @param label_help (`shiny.tag`) optional\cr +#' object of class `shiny.tag`, e.g. an object returned by [shiny::helpText()] #' @param ... optional arguments to `sliderInput` #' #' @return (`shiny.tag`) HTML tag with `sliderInput` widget. @@ -508,8 +508,8 @@ optionalSliderInput <- function(inputId, label, min, max, value, label_help = NU } } -#' For `teal` modules we parameterize an \code{optionalSliderInput} with one argument -#' \code{value_min_max} +#' For `teal` modules we parameterize an `optionalSliderInput` with one argument +#' `value_min_max` #' #' @description `r lifecycle::badge("stable")` #' The [optionalSliderInput()] function needs three arguments to determine @@ -566,7 +566,7 @@ optionalSliderInputValMinMax <- function(inputId, label, value_min_max, label_he #' #' @param choices (`list` or `vector`)\cr #' select choices -#' @param values (optional)\cr +#' @param values optional\cr #' choices subset for which labels should be extracted, `NULL` for all choices. #' #' @return (`character`) vector with labels diff --git a/R/panel_group.R b/R/panel_group.R index 0ff51d38..94e149e7 100644 --- a/R/panel_group.R +++ b/R/panel_group.R @@ -78,9 +78,9 @@ panel_group <- function(..., id = NULL) { #' Designed to be grouped using [`panel_group`] element. Used to handle `shiny` inputs in the encoding panel. #' @param title (`character`)\cr title of panel #' @param ... content of panel -#' @param collapsed (`logical`, optional)\cr +#' @param collapsed (`logical`) optional,\cr #' whether to initially collapse panel -#' @param input_id (`character`, optional)\cr +#' @param input_id (`character`) optional\cr #' name of the panel item element. If supplied, this will register a shiny input variable that #' indicates whether the panel item is open or collapsed and is accessed with `input$input_id`. #' diff --git a/R/plot_with_settings.R b/R/plot_with_settings.R index 6f3c3316..96b9855a 100644 --- a/R/plot_with_settings.R +++ b/R/plot_with_settings.R @@ -73,33 +73,33 @@ plot_with_settings_ui <- function(id) { #' `reactive` expression or a simple `function` to draw a plot. #' A simple `function` is needed e.g. for base plots like `plot(1)` as the output can not be caught when downloading. #' Take into account that simple functions are less efficient than reactive, as not catching the result. -#' @param height (`numeric`, optional)\cr +#' @param height (`numeric`) optional\cr #' vector with three elements c(VAL, MIN, MAX), where VAL is the starting value of the slider in #' the main and modal plot display. The value in the modal display is taken from the value of the #' slider in the main plot display. -#' @param width (`numeric`, optional)\cr +#' @param width (`numeric`) optional\cr #' vector with three elements `c(VAL, MIN, MAX)`, where VAL is the starting value of the slider in #' the main and modal plot display; `NULL` for default display. The value in the modal #' display is taken from the value of the slider in the main plot display. -#' @param show_hide_signal optional, (\code{reactive logical} a mechanism to allow modules which call this +#' @param show_hide_signal optional, (`reactive logical` a mechanism to allow modules which call this #' module to show/hide the plot_with_settings UI) -#' @param brushing (`logical`, optional)\cr -#' a mechanism to enable / disable brushing on the main plot (in particular: not the one displayed +#' @param brushing (`logical`) optional\cr +#' mechanism to enable / disable brushing on the main plot (in particular: not the one displayed #' in modal). All the brushing data is stored as a reactive object in the `"brush"` element of #' returned list. See the example for details. #' @param clicking (`logical`)\cr #' a mechanism to enable / disable clicking on data points on the main plot (in particular: not the #' one displayed in modal). All the clicking data is stored as a reactive object in the `"click"` #' element of returned list. See the example for details. -#' @param dblclicking (`logical`, optional)\cr -#' a mechanism to enable / disable double-clicking on data points on the main plot (in particular: +#' @param dblclicking (`logical`) optional\cr +#' mechanism to enable / disable double-clicking on data points on the main plot (in particular: #' not the one displayed in modal). All the double clicking data is stored as a reactive object in #' the `"dblclick"` element of returned list. See the example for details. -#' @param hovering (`logical(1)`, optional)\cr -#' a mechanism to enable / disable hovering over data points on the main plot (in particular: not +#' @param hovering (`logical(1)`) optional\cr +#' mechanism to enable / disable hovering over data points on the main plot (in particular: not #' the one displayed in modal). All the hovering data is stored as a reactive object in the #' `"hover"` element of returned list. See the example for details. -#' @param graph_align (`character(1)`, optional)\cr +#' @param graph_align (`character(1)`) optional,\cr #' one of `"left"` (default), `"center"`, `"right"` or `"justify"`. The alignment of the graph on #' the main page. #' diff --git a/R/standard_layout.R b/R/standard_layout.R index 73423bef..a200f9f6 100644 --- a/R/standard_layout.R +++ b/R/standard_layout.R @@ -12,12 +12,12 @@ #' panel on the right is created. #' @param forms (`tagList`)\cr #' for example [shiny::actionButton()] that are placed below the encodings panel -#' @param pre_output (`shiny.tag`, optional)\cr +#' @param pre_output (`shiny.tag`) optional,\cr #' with text placed before the output to put the output into context. For example a title. -#' @param post_output (`shiny.tag`, optional) with text placed after the output to put the output +#' @param post_output (`shiny.tag`) optional, with text placed after the output to put the output #' into context. For example the [shiny::helpText()] elements are useful. #' -#' @return an object of class \code{shiny.tag} with the UI code. +#' @return an object of class `shiny.tag` with the UI code. #' #' @examples #' library(shiny) diff --git a/R/table_with_settings.R b/R/table_with_settings.R index 9d34ebe6..9e0294c6 100644 --- a/R/table_with_settings.R +++ b/R/table_with_settings.R @@ -39,8 +39,8 @@ table_with_settings_ui <- function(id, ...) { #' @inheritParams shiny::moduleServer #' @param table_r (`reactive`)\cr #' reactive expression that yields an `rtable` object (`ElementaryTable` or `TableTree`) -#' @param show_hide_signal (`reactive logical`, optional)\cr -#' a mechanism to allow modules which call this module to show/hide the table_with_settings UI. +#' @param show_hide_signal (`reactive logical`) optional\cr +#' mechanism to allow modules which call this module to show/hide the table_with_settings UI. #' #' @rdname table_with_settings #' diff --git a/R/utils.R b/R/utils.R index b5c677f0..a503b240 100644 --- a/R/utils.R +++ b/R/utils.R @@ -32,7 +32,7 @@ apply_plot_modifications <- function(plot_obj, plot_type, dblclicking, ranges) { } } -#' This function opens a PDF graphics device using \code{\link[grDevices]{pdf}} to suppress +#' This function opens a PDF graphics device using [grDevices::pdf()] to suppress #' the plot display in the IDE. The purpose of this function is to avoid opening graphic devices #' directly in the IDE. #' diff --git a/man/extract_choices_labels.Rd b/man/extract_choices_labels.Rd index b2c15adc..1e5f403f 100644 --- a/man/extract_choices_labels.Rd +++ b/man/extract_choices_labels.Rd @@ -10,7 +10,7 @@ extract_choices_labels(choices, values = NULL) \item{choices}{(\code{list} or \code{vector})\cr select choices} -\item{values}{(optional)\cr +\item{values}{optional\cr choices subset for which labels should be extracted, \code{NULL} for all choices.} } \value{ diff --git a/man/optionalSelectInput.Rd b/man/optionalSelectInput.Rd index a9939a75..53b9cca7 100644 --- a/man/optionalSelectInput.Rd +++ b/man/optionalSelectInput.Rd @@ -48,13 +48,13 @@ columns.} \item{options}{List of options, see \link[shinyWidgets]{pickerOptions} for all available options. To limit the number of selection possible, see example below.} -\item{label_help}{(\code{shiny.tag} optional)\cr +\item{label_help}{(\code{shiny.tag}) optional,\cr e.g. an object returned by \code{\link[shiny:helpText]{shiny::helpText()}}.} -\item{fixed}{(\code{logical(1)} optional)\cr +\item{fixed}{(\code{logical(1)}) optional,\cr whether to block user to select choices.} -\item{fixed_on_single}{(\code{logical(1)} optional)\cr +\item{fixed_on_single}{(\code{logical(1)}) optional,\cr whether to block user to select a choice when there is only one or less choice. When \code{FALSE}, user is still able to select or deselect the choice.} diff --git a/man/optionalSliderInput.Rd b/man/optionalSliderInput.Rd index 77d2dbe9..4aa991a0 100644 --- a/man/optionalSliderInput.Rd +++ b/man/optionalSliderInput.Rd @@ -19,8 +19,8 @@ selected.} create a regular slider; a length two vector will create a double-ended range slider. Must lie between \code{min} and \code{max}.} -\item{label_help}{(\code{shiny.tag}, optional)\cr -an object of class \code{shiny.tag}. E.g. an object returned by \code{\link[shiny:helpText]{shiny::helpText()}}} +\item{label_help}{(\code{shiny.tag}) optional\cr +object of class \code{shiny.tag}, e.g. an object returned by \code{\link[shiny:helpText]{shiny::helpText()}}} \item{...}{optional arguments to \code{sliderInput}} } diff --git a/man/optionalSliderInputValMinMax.Rd b/man/optionalSliderInputValMinMax.Rd index 4c89363b..c7c73796 100644 --- a/man/optionalSliderInputValMinMax.Rd +++ b/man/optionalSliderInputValMinMax.Rd @@ -23,8 +23,8 @@ If of length 1 then the value gets set to that number and the \code{sliderInput} Otherwise, if it is of length three the three elements will map to \code{value}, \code{min} and \code{max} of the \code{\link[=optionalSliderInput]{optionalSliderInput()}} function.} -\item{label_help}{(\code{shiny.tag}, optional)\cr -an object of class \code{shiny.tag}. E.g. an object returned by \code{\link[shiny:helpText]{shiny::helpText()}}} +\item{label_help}{(\code{shiny.tag}) optional\cr +object of class \code{shiny.tag}, e.g. an object returned by \code{\link[shiny:helpText]{shiny::helpText()}}} \item{...}{optional arguments to \code{sliderInput}} } diff --git a/man/panel_item.Rd b/man/panel_item.Rd index b8ef5db8..071458d1 100644 --- a/man/panel_item.Rd +++ b/man/panel_item.Rd @@ -11,10 +11,10 @@ panel_item(title, ..., collapsed = TRUE, input_id = NULL) \item{...}{content of panel} -\item{collapsed}{(\code{logical}, optional)\cr +\item{collapsed}{(\code{logical}) optional,\cr whether to initially collapse panel} -\item{input_id}{(\code{character}, optional)\cr +\item{input_id}{(\code{character}) optional\cr name of the panel item element. If supplied, this will register a shiny input variable that indicates whether the panel item is open or collapsed and is accessed with \code{input$input_id}.} } diff --git a/man/plot_suppress.Rd b/man/plot_suppress.Rd index 2b26754d..e072bbc1 100644 --- a/man/plot_suppress.Rd +++ b/man/plot_suppress.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/utils.R \name{plot_suppress} \alias{plot_suppress} -\title{This function opens a PDF graphics device using \code{\link[grDevices]{pdf}} to suppress +\title{This function opens a PDF graphics device using \code{\link[grDevices:pdf]{grDevices::pdf()}} to suppress the plot display in the IDE. The purpose of this function is to avoid opening graphic devices directly in the IDE.} \usage{ @@ -12,7 +12,7 @@ plot_suppress(x) \item{x}{lazy binding which generates the plot(s)} } \description{ -This function opens a PDF graphics device using \code{\link[grDevices]{pdf}} to suppress +This function opens a PDF graphics device using \code{\link[grDevices:pdf]{grDevices::pdf()}} to suppress the plot display in the IDE. The purpose of this function is to avoid opening graphic devices directly in the IDE. } diff --git a/man/plot_with_settings.Rd b/man/plot_with_settings.Rd index 32289b17..56ee7e3b 100644 --- a/man/plot_with_settings.Rd +++ b/man/plot_with_settings.Rd @@ -29,21 +29,21 @@ plot_with_settings_srv( A simple \code{function} is needed e.g. for base plots like \code{plot(1)} as the output can not be caught when downloading. Take into account that simple functions are less efficient than reactive, as not catching the result.} -\item{height}{(\code{numeric}, optional)\cr +\item{height}{(\code{numeric}) optional\cr vector with three elements c(VAL, MIN, MAX), where VAL is the starting value of the slider in the main and modal plot display. The value in the modal display is taken from the value of the slider in the main plot display.} -\item{width}{(\code{numeric}, optional)\cr +\item{width}{(\code{numeric}) optional\cr vector with three elements \code{c(VAL, MIN, MAX)}, where VAL is the starting value of the slider in the main and modal plot display; \code{NULL} for default display. The value in the modal display is taken from the value of the slider in the main plot display.} -\item{show_hide_signal}{optional, (\code{reactive logical} a mechanism to allow modules which call this +\item{show_hide_signal}{optional, (\verb{reactive logical} a mechanism to allow modules which call this module to show/hide the plot_with_settings UI)} -\item{brushing}{(\code{logical}, optional)\cr -a mechanism to enable / disable brushing on the main plot (in particular: not the one displayed +\item{brushing}{(\code{logical}) optional\cr +mechanism to enable / disable brushing on the main plot (in particular: not the one displayed in modal). All the brushing data is stored as a reactive object in the \code{"brush"} element of returned list. See the example for details.} @@ -52,17 +52,17 @@ a mechanism to enable / disable clicking on data points on the main plot (in par one displayed in modal). All the clicking data is stored as a reactive object in the \code{"click"} element of returned list. See the example for details.} -\item{dblclicking}{(\code{logical}, optional)\cr -a mechanism to enable / disable double-clicking on data points on the main plot (in particular: +\item{dblclicking}{(\code{logical}) optional\cr +mechanism to enable / disable double-clicking on data points on the main plot (in particular: not the one displayed in modal). All the double clicking data is stored as a reactive object in the \code{"dblclick"} element of returned list. See the example for details.} -\item{hovering}{(\code{logical(1)}, optional)\cr -a mechanism to enable / disable hovering over data points on the main plot (in particular: not +\item{hovering}{(\code{logical(1)}) optional\cr +mechanism to enable / disable hovering over data points on the main plot (in particular: not the one displayed in modal). All the hovering data is stored as a reactive object in the \code{"hover"} element of returned list. See the example for details.} -\item{graph_align}{(\code{character(1)}, optional)\cr +\item{graph_align}{(\code{character(1)}) optional,\cr one of \code{"left"} (default), \code{"center"}, \code{"right"} or \code{"justify"}. The alignment of the graph on the main page.} } diff --git a/man/standard_layout.Rd b/man/standard_layout.Rd index b0630dec..7e9b15e4 100644 --- a/man/standard_layout.Rd +++ b/man/standard_layout.Rd @@ -24,10 +24,10 @@ panel on the right is created.} \item{forms}{(\code{tagList})\cr for example \code{\link[shiny:actionButton]{shiny::actionButton()}} that are placed below the encodings panel} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}) optional,\cr with text placed before the output to put the output into context. For example a title.} -\item{post_output}{(\code{shiny.tag}, optional) with text placed after the output to put the output +\item{post_output}{(\code{shiny.tag}) optional, with text placed after the output to put the output into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} } \value{ diff --git a/man/table_with_settings.Rd b/man/table_with_settings.Rd index 870a8ae9..f56bcfc2 100644 --- a/man/table_with_settings.Rd +++ b/man/table_with_settings.Rd @@ -20,8 +20,8 @@ Useful for providing additional HTML classes for the output tag.} \item{table_r}{(\code{reactive})\cr reactive expression that yields an \code{rtable} object (\code{ElementaryTable} or \code{TableTree})} -\item{show_hide_signal}{(\verb{reactive logical}, optional)\cr -a mechanism to allow modules which call this module to show/hide the table_with_settings UI.} +\item{show_hide_signal}{(\verb{reactive logical}) optional\cr +mechanism to allow modules which call this module to show/hide the table_with_settings UI.} } \value{ A \code{shiny} module. From a77cddd52a5d6d7f8f116dc968c151d286290ea6 Mon Sep 17 00:00:00 2001 From: kartikeyakirar Date: Thu, 14 Mar 2024 13:37:10 +0000 Subject: [PATCH 2/2] [skip actions] Bump version to 0.4.2.9007 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d9374f3e..10ec0242 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: teal.widgets Title: 'shiny' Widgets for 'teal' Applications -Version: 0.4.2.9006 -Date: 2024-03-07 +Version: 0.4.2.9007 +Date: 2024-03-14 Authors@R: c( person("Dawid", "Kaledkowski", , "dawid.kaledkowski@roche.com", role = c("aut", "cre")), person("Pawel", "Rucki", , "pawel.rucki@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index c7c45651..c9c4df81 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal.widgets 0.4.2.9006 +# teal.widgets 0.4.2.9007 # teal.widgets 0.4.2