diff --git a/R/data.R b/R/data.R index 55670eebe..0f8a64e04 100644 --- a/R/data.R +++ b/R/data.R @@ -1,64 +1,39 @@ #' Random adverse events -#' -#' @description Random adverse events #' @docType data -#' #' @usage rADAE -#' #' @keywords datasets internal -#' #' @source internal #' @name rADAE "rADAE" #' Random lab analysis -#' -#' @description Random lab analysis #' @docType data -#' #' @usage rADLB -#' #' @keywords datasets internal -#' #' @source internal #' @name rADLB "rADLB" #' Random response -#' -#' @description Random response #' @docType data -#' #' @usage rADRS -#' #' @keywords datasets internal -#' #' @source internal #' @name rADRS "rADRS" #' Random patient listing -#' -#' @description Random patient listing #' @docType data -#' #' @usage rADSL -#' #' @keywords datasets internal -#' #' @source internal #' @name rADSL "rADSL" -#' Random Time to Event Analysis Dataset -#' -#' @description Random Time to Event Analysis Dataset +#' Random time to event analysis dataset #' @docType data -#' #' @usage rADTTE -#' #' @keywords datasets internal -#' #' @source internal #' @name rADTTE "rADTTE" diff --git a/R/teal.modules.general.R b/R/teal.modules.general.R index a6cad3d13..b35caf9dc 100644 --- a/R/teal.modules.general.R +++ b/R/teal.modules.general.R @@ -1,4 +1,4 @@ -#' teal.modules.general: General modules to add to a teal application +#' `teal.modules.general`: General modules to add to a teal application #' #' The modules in this package are generic modules that should work with any data set #' (not necessarily for clinical trials data). diff --git a/R/utils.R b/R/utils.R index ef6702ee6..fd0dbef79 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,29 +1,30 @@ -#' Shared Parameters +#' Shared parameters documentation #' -#' @description Contains arguments that are shared between multiple functions -#' in the package to avoid repetition using `inheritParams`. +#' Defines common arguments shared across multiple functions in the package +#' to avoid repetition by using `inheritParams`. #' -#' @param plot_height optional, (`numeric`) A vector of length three with `c(value, min and max)` -#' for a slider encoding the plot height. -#' @param plot_width optional, (`numeric`) A vector of length three with `c(value, min and max)` -#' for a slider encoding the plot width. +#' @param plot_height optional, (`numeric`) Specifies the plot height as a three-element vector of +#' `value`, `min`, and `max` intended for use with a slider UI element. +#' @param plot_width optional, (`numeric`) Specifies the plot width as a three-element vector of +#' `value`, `min`, and `max` for a slider encoding the plot width. #' @param rotate_xaxis_labels optional, (`logical`) Whether to rotate plot X axis labels. Does not -#' rotate by default (`FALSE`). +#' rotate by default (`FALSE`). #' @param ggtheme optional, (`character`) `ggplot2` theme to be used by default. Defaults to `"gray"`. #' @param ggplot2_args (`ggplot2_args`) object created by [teal.widgets::ggplot2_args()] -#' with settings for the module plot. -#' The argument is merged with options variable `teal.ggplot2_args` and default module setup. +#' with settings for the module plot. +#' The argument is merged with options variable `teal.ggplot2_args` and default module setup. #' -#' For more details see the vignette: `vignette("custom-ggplot2-arguments", package = "teal.widgets")` +#' For more details see the vignette: `vignette("custom-ggplot2-arguments", package = "teal.widgets")` #' @param basic_table_args (`basic_table_args`) object created by [teal.widgets::basic_table_args()] -#' with settings for the module table. -#' The argument is merged with options variable `teal.basic_table_args` and default module setup. +#' with settings for the module table. +#' The argument is merged with options variable `teal.basic_table_args` and default module setup. #' -#' For more details see the vignette: `vignette("custom-basic-table-arguments", package = "teal.widgets")` -#' @param pre_output (`shiny.tag`, optional)\cr +#' For more details see the vignette: `vignette("custom-basic-table-arguments", package = "teal.widgets")` +#' @param pre_output (`shiny.tag`, optional) Text or UI element to be displayed before the module's output, +#' providing context or a title. #' 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 -#' into context. For example the [shiny::helpText()] elements are useful. +#' @param post_output (`shiny.tag`, optional) Text or UI element to be displayed after the module's output, +#' adding context or further instructions. Elements like `shiny::helpText()` are useful. #' #' @return Object of class `teal_module` to be used in `teal` applications. #' @@ -31,23 +32,20 @@ #' @keywords internal NULL -#' Add axis labels that show facetting variable +#' Add labels for facets to a ggplot2 object #' -#' Add axis labels that show facetting variable +#' Enhances a ggplot2 plot by adding labels that describe +#' the faceting variables along the x and y axes. #' -#' @param p `ggplot2` object to add facet labels to -#' @param xfacet_label label of facet along x axis (nothing created if NULL), -#' if vector, will be concatenated with " & " -#' @param yfacet_label label of facet along y axis (nothing created if NULL), -#' if vector, will be concatenated with " & " +#' @param p (`ggplot2`) object to which facet labels will be added. +#' @param xfacet_label (`character`) Label for the facet along the x-axis. +#' If `NULL`, no label is added. If a vector, labels are joined with " & ". +#' @param yfacet_label (`character`) Label for the facet along the y-axis. +#' Similar behavior to `xfacet_label`. #' -#' @return grid grob object (to be drawn with \code{grid.draw}) -#' -#' @export +#' @return Returns `grid` or `grob` object (to be drawn with `grid.draw`) #' #' @examples -#' # we put donttest to avoid strictr error with seq along.with argument -#' \donttest{ #' library(ggplot2) #' library(grid) #' @@ -55,7 +53,7 @@ NULL #' aes(x = mpg, y = disp) + #' geom_point() + #' facet_grid(gear ~ cyl) -#' p +#' #' xfacet_label <- "cylinders" #' yfacet_label <- "gear" #' res <- add_facet_labels(p, xfacet_label, yfacet_label) @@ -68,7 +66,8 @@ NULL #' grid.draw(add_facet_labels(p, xfacet_label, yfacet_label = NULL)) #' grid.newpage() #' grid.draw(add_facet_labels(p, xfacet_label = NULL, yfacet_label = NULL)) -#' } +#' +#' @export #' add_facet_labels <- function(p, xfacet_label = NULL, yfacet_label = NULL) { checkmate::assert_class(p, classes = "ggplot") @@ -122,46 +121,42 @@ add_facet_labels <- function(p, xfacet_label = NULL, yfacet_label = NULL) { #' Call a function with a character vector for the \code{...} argument #' -#' @param fun (\code{character}) Name of a function where the \code{...} argument +#' @param fun (`character`) Name of a function where the \code{...} argument #' shall be replaced by values from \code{str_args}. -#' @param str_args (\code{character}) A character vector that the function shall +#' @param str_args (`character`) A character vector that the function shall #' be executed with #' -#' @return: call (i.e. expression) of the function provided by \code{fun} +#' @return Call (i.e. expression) of the function provided by \code{fun} #' with arguments provided by \code{str_args}. -#' @keywords internal #' #' @examples -#' \dontrun{ +#' call_fun_dots <- getFromNamespace("call_fun_dots", "teal.modules.general") +#' #' a <- 1 #' b <- 2 #' call_fun_dots("sum", c("a", "b")) #' eval(call_fun_dots("sum", c("a", "b"))) -#' } +#' +#' @keywords internal +#' call_fun_dots <- function(fun, str_args) { do.call("call", c(list(fun), lapply(str_args, as.name)), quote = TRUE) } -#' Get variable name with label +#' Generate a string for a variable including its label #' -#' @param var_names (\code{character}) Name of variable to extract labels from. -#' @param dataset (\code{dataset}) Name of analysis dataset. -#' @param prefix (\code{character}) String to paste to the beginning of the +#' @param var_names (`character`) Name of variable to extract labels from. +#' @param dataset (`dataset`) Name of analysis dataset. +#' @param prefix (`character`) String to paste to the beginning of the #' variable name with label. -#' @param suffix (\code{character}) String to paste to the end of the variable +#' @param suffix (`character`) String to paste to the end of the variable #' name with label. -#' @param wrap_width (\code{numeric}) Number of characters to wrap original +#' @param wrap_width (`numeric`) Number of characters to wrap original #' label to. Defaults to 80. #' -#' @return (\code{character}) String with variable name and label. +#' @return (`character`) String with variable name and label. #' @keywords internal #' -#' @examples -#' \dontrun{ -#' ADSL <- teal.modules.general::rADSL -#' -#' varname_w_label("AGE", ADSL) -#' } varname_w_label <- function(var_names, dataset, wrap_width = 80, @@ -205,17 +200,20 @@ shape_names <- c( #' Get icons to represent variable types in dataset #' #' @param var_type (`character`)\cr -#' of R internal types (classes). +#' of `R` internal types (classes). #' -#' @return (`character`)\cr -#' vector of HTML icons corresponding to data type in each column. -#' @keywords internal +#' @return Vector of HTML icons corresponding to data type in each column. #' #' @examples -#' teal.modules.general:::variable_type_icons(c( +#' variable_type_icons <- getFromNamespace("variable_type_icons", "teal.modules.general") +#' +#' variable_type_icons(c( #' "integer", "numeric", "logical", "Date", "POSIXct", "POSIXlt", #' "factor", "character", "unknown", "" #' )) +#' +#' @keywords internal +#' variable_type_icons <- function(var_type) { checkmate::assert_character(var_type, any.missing = FALSE) @@ -256,10 +254,11 @@ variable_type_icons <- function(var_type) { #' not work with `devtools`. Therefore, we redefine this method in each package #' as needed. Thus, we do not export this method #' -#' @param pattern (`character`) pattern of files to be included +#' @param pattern (`character`) optional regular expression to match the file names to be included. #' -#' @return HTML code that includes `CSS` files +#' @return HTML code that includes `CSS` files. #' @keywords internal +#' include_css_files <- function(pattern = "*") { css_files <- list.files( system.file("css", package = "teal.modules.general", mustWork = TRUE), @@ -271,12 +270,14 @@ include_css_files <- function(pattern = "*") { return(shiny::singleton(shiny::tags$head(lapply(css_files, shiny::includeCSS)))) } - -#' Get a string with java-script code checking if the specific tab is clicked -#' @description will be the input for `shiny::conditionalPanel()` -#' @param id `character(1)` the id of the tab panel with tabs. -#' @param name `character(1)` the name of the tab. +#' JavaScript condition to check if a specific tab is active +#' +#' @param id (`character(1)`) the id of the tab panel with tabs. +#' @param name (`character(1)`) the name of the tab. +#' @return JavaScript expression to be used in `shiny::conditionalPanel()` to determine +#' if the specified tab is active. #' @keywords internal +#' is_tab_active_js <- function(id, name) { # supporting the bs3 and higher version at the same time sprintf( diff --git a/man/add_facet_labels.Rd b/man/add_facet_labels.Rd index 00dffea1b..02cd828ba 100644 --- a/man/add_facet_labels.Rd +++ b/man/add_facet_labels.Rd @@ -2,28 +2,27 @@ % Please edit documentation in R/utils.R \name{add_facet_labels} \alias{add_facet_labels} -\title{Add axis labels that show facetting variable} +\title{Add labels for facets to a ggplot2 object} \usage{ add_facet_labels(p, xfacet_label = NULL, yfacet_label = NULL) } \arguments{ -\item{p}{\code{ggplot2} object to add facet labels to} +\item{p}{(\code{ggplot2}) object to which facet labels will be added.} -\item{xfacet_label}{label of facet along x axis (nothing created if NULL), -if vector, will be concatenated with " & "} +\item{xfacet_label}{(\code{character}) Label for the facet along the x-axis. +If \code{NULL}, no label is added. If a vector, labels are joined with " & ".} -\item{yfacet_label}{label of facet along y axis (nothing created if NULL), -if vector, will be concatenated with " & "} +\item{yfacet_label}{(\code{character}) Label for the facet along the y-axis. +Similar behavior to \code{xfacet_label}.} } \value{ -grid grob object (to be drawn with \code{grid.draw}) +Returns \code{grid} or \code{grob} object (to be drawn with \code{grid.draw}) } \description{ -Add axis labels that show facetting variable +Enhances a ggplot2 plot by adding labels that describe +the faceting variables along the x and y axes. } \examples{ -# we put donttest to avoid strictr error with seq along.with argument -\donttest{ library(ggplot2) library(grid) @@ -31,7 +30,7 @@ p <- ggplot(mtcars) + aes(x = mpg, y = disp) + geom_point() + facet_grid(gear ~ cyl) -p + xfacet_label <- "cylinders" yfacet_label <- "gear" res <- add_facet_labels(p, xfacet_label, yfacet_label) @@ -44,6 +43,5 @@ grid.newpage() grid.draw(add_facet_labels(p, xfacet_label, yfacet_label = NULL)) grid.newpage() grid.draw(add_facet_labels(p, xfacet_label = NULL, yfacet_label = NULL)) -} } diff --git a/man/call_fun_dots.Rd b/man/call_fun_dots.Rd index 001a654b2..249ed5438 100644 --- a/man/call_fun_dots.Rd +++ b/man/call_fun_dots.Rd @@ -14,18 +14,19 @@ shall be replaced by values from \code{str_args}.} be executed with} } \value{ -: call (i.e. expression) of the function provided by \code{fun} +Call (i.e. expression) of the function provided by \code{fun} with arguments provided by \code{str_args}. } \description{ Call a function with a character vector for the \code{...} argument } \examples{ -\dontrun{ +call_fun_dots <- getFromNamespace("call_fun_dots", "teal.modules.general") + a <- 1 b <- 2 call_fun_dots("sum", c("a", "b")) eval(call_fun_dots("sum", c("a", "b"))) -} + } \keyword{internal} diff --git a/man/include_css_files.Rd b/man/include_css_files.Rd index dad825f75..44c46e76d 100644 --- a/man/include_css_files.Rd +++ b/man/include_css_files.Rd @@ -7,10 +7,10 @@ include_css_files(pattern = "*") } \arguments{ -\item{pattern}{(\code{character}) pattern of files to be included} +\item{pattern}{(\code{character}) optional regular expression to match the file names to be included.} } \value{ -HTML code that includes \code{CSS} files +HTML code that includes \code{CSS} files. } \description{ \code{system.file} should not be used to access files in other packages, it does diff --git a/man/is_tab_active_js.Rd b/man/is_tab_active_js.Rd index 05b67aa04..1d8031073 100644 --- a/man/is_tab_active_js.Rd +++ b/man/is_tab_active_js.Rd @@ -2,16 +2,20 @@ % Please edit documentation in R/utils.R \name{is_tab_active_js} \alias{is_tab_active_js} -\title{Get a string with java-script code checking if the specific tab is clicked} +\title{JavaScript condition to check if a specific tab is active} \usage{ is_tab_active_js(id, name) } \arguments{ -\item{id}{\code{character(1)} the id of the tab panel with tabs.} +\item{id}{(\code{character(1)}) the id of the tab panel with tabs.} -\item{name}{\code{character(1)} the name of the tab.} +\item{name}{(\code{character(1)}) the name of the tab.} +} +\value{ +JavaScript expression to be used in \code{shiny::conditionalPanel()} to determine +if the specified tab is active. } \description{ -will be the input for \code{shiny::conditionalPanel()} +JavaScript condition to check if a specific tab is active } \keyword{internal} diff --git a/man/rADTTE.Rd b/man/rADTTE.Rd index 56d859833..185d391d9 100644 --- a/man/rADTTE.Rd +++ b/man/rADTTE.Rd @@ -3,7 +3,7 @@ \docType{data} \name{rADTTE} \alias{rADTTE} -\title{Random Time to Event Analysis Dataset} +\title{Random time to event analysis dataset} \format{ An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 2000 rows and 67 columns. } @@ -14,7 +14,7 @@ internal rADTTE } \description{ -Random Time to Event Analysis Dataset +Random time to event analysis dataset } \keyword{datasets} \keyword{internal} diff --git a/man/shared_params.Rd b/man/shared_params.Rd index 1d130bd66..22c4ee66a 100644 --- a/man/shared_params.Rd +++ b/man/shared_params.Rd @@ -2,13 +2,13 @@ % Please edit documentation in R/utils.R \name{shared_params} \alias{shared_params} -\title{Shared Parameters} +\title{Shared parameters documentation} \arguments{ -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{rotate_xaxis_labels}{optional, (\code{logical}) Whether to rotate plot X axis labels. Does not rotate by default (\code{FALSE}).} @@ -27,17 +27,18 @@ The argument is merged with options variable \code{teal.basic_table_args} and de For more details see the vignette: \code{vignette("custom-basic-table-arguments", package = "teal.widgets")}} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \value{ Object of class \code{teal_module} to be used in \code{teal} applications. } \description{ -Contains arguments that are shared between multiple functions -in the package to avoid repetition using \code{inheritParams}. +Defines common arguments shared across multiple functions in the package +to avoid repetition by using \code{inheritParams}. } \keyword{internal} diff --git a/man/teal.modules.general.Rd b/man/teal.modules.general.Rd index 4a9330dab..6c36e3436 100644 --- a/man/teal.modules.general.Rd +++ b/man/teal.modules.general.Rd @@ -4,7 +4,7 @@ \name{teal.modules.general} \alias{teal.modules.general-package} \alias{teal.modules.general} -\title{teal.modules.general: General modules to add to a teal application} +\title{\code{teal.modules.general}: General modules to add to a teal application} \description{ The modules in this package are generic modules that should work with any data set (not necessarily for clinical trials data). diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index b72a00134..fd9a063e7 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -26,11 +26,11 @@ For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dat}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) specifying columns used to compute PCA.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} @@ -64,11 +64,12 @@ It controls the font size for plot titles, axis labels, and legends. \item while vector of \code{value}, \code{min}, and \code{max} allows dynamic adjustment. }} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \description{ Module conducts principal component analysis (PCA) on a given dataset and offers different diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index 053246eea..100cdaeab 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -30,11 +30,11 @@ Regressor variables from an incoming dataset with filtering and selecting.} \item{response}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}) Response variables from an incoming dataset with filtering and selecting.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{alpha}{optional, (\code{numeric}) If scalar then the plot points will have a fixed opacity. If a slider should be presented to adjust the plot point opacity dynamically then it can be a vector of @@ -54,11 +54,12 @@ List names should match the following: \verb{c("default", "Response vs Regressor For more details see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} \item{default_plot_type}{optional, (\code{numeric}) Defaults to Response vs Regressor. \enumerate{ diff --git a/man/tm_data_table.Rd b/man/tm_data_table.Rd index 3b4136be5..40bf5e54b 100644 --- a/man/tm_data_table.Rd +++ b/man/tm_data_table.Rd @@ -40,11 +40,12 @@ Note: Only datasets of the \code{data.frame} class are compatible.} \item{server_rendering}{(\code{logical}) should the data table be rendered server side (see \code{server} argument of \code{\link[DT:dataTableOutput]{DT::renderDataTable()}})} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \description{ Module provides a dynamic and interactive way to view \code{data.frame}s in a \code{teal} application. diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index 1bfeb9c64..dc45e7014 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -33,20 +33,21 @@ associated variables.} \item{show_association}{optional, (\code{logical}) Whether show association of \code{vars} with reference variable. Defaults to \code{TRUE}.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{distribution_theme, association_theme}{optional, (\code{character}) \code{ggplot2} themes to be used by default. Default to \code{"gray"}.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} \item{ggplot2_args}{optional, (\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for all the plots or named list of \code{ggplot2_args} objects for plot-specific settings. diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index c97ee92bb..6993e682b 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -75,11 +75,11 @@ Does not allow scaling to be changed by default (\code{FALSE}).} \item{free_y_scales}{(\code{logical}, optional) Whether Y scaling shall be changeable. Does not allow scaling to be changed by default (\code{FALSE}).} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{rotate_xaxis_labels}{optional, (\code{logical}) Whether to rotate plot X axis labels. Does not rotate by default (\code{FALSE}).} @@ -94,11 +94,12 @@ The argument is merged with options variable \code{teal.ggplot2_args} and defaul For more details see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \description{ Module enables the creation of univariate and bivariate plots, diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index a359f7333..a28ed628a 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -50,11 +50,11 @@ If a slider should be presented to adjust the number of histogram bins dynamical vector of length three with \code{c(value, min, max)}. Defaults to \code{c(30L, 1L, 100L)}.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{pre_output}{(\code{shiny.tag}, optional)\cr with text placed before the output to put the output into context. For example a title.} diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index 74c6b40ac..51c737d52 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -60,11 +60,11 @@ rotate by default (\code{FALSE}).} Indicates whether to display frequency (\code{TRUE}) or density (\code{FALSE}). Defaults to density (\code{FALSE}).} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} @@ -74,11 +74,12 @@ The argument is merged with options variable \code{teal.ggplot2_args} and defaul For more details see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \value{ Object of class \code{teal_module} to be used in \code{teal} applications. diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index c6f80e12f..3dc11cac4 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -48,11 +48,11 @@ Specifies the variable(s) for faceting rows.} \item{col_facet}{(\code{data_extract_spec} or \code{list} of multiple \code{data_extract_spec}, optional) Specifies the variable(s) for faceting columns.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{alpha}{(\code{numeric}, optional) Specifies point opacity. \itemize{ @@ -77,11 +77,12 @@ rotate by default (\code{FALSE}).} \item{ggtheme}{optional, (\code{character}) \code{ggplot2} theme to be used by default. Defaults to \code{"gray"}.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} \item{table_dec}{(\code{integer}, optional) Number of decimal places used to round numeric values in the table.} diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index 071175f9d..120a32476 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -22,17 +22,18 @@ Plotting variables from an incoming dataset with filtering and selecting. In cas \code{data_extract_spec} use \code{select_spec(..., ordered = TRUE)} if plot elements should be rendered according to selection order.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \description{ The available datasets to choose from for each dataset selector is the same and diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 08c9090f9..87b513723 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -21,11 +21,11 @@ tm_missing_data( \item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. For \code{modules()} defaults to \code{"root"}. See \code{Details}.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} \item{parent_dataname}{(\code{character(1)}) If this \code{dataname} exists in then "the by subject"graph is displayed. For \code{CDISC} data. In non \code{CDISC} data this can be ignored. Defaults to \code{"ADSL"}.} @@ -40,11 +40,12 @@ List names should match the following: \code{c("default", "Summary Obs", "Summar For more details see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \description{ Present analysis of missing observations and patients. diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index b0898aa19..9bda163f3 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -36,17 +36,18 @@ List names should match the following: \code{c("default", "Boxplot","Density Plo For more details see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}.} -\item{plot_height}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot height.} +\item{plot_height}{optional, (\code{numeric}) Specifies the plot height as a three-element vector of +\code{value}, \code{min}, and \code{max} intended for use with a slider UI element.} -\item{plot_width}{optional, (\code{numeric}) A vector of length three with \verb{c(value, min and max)} -for a slider encoding the plot width.} +\item{plot_width}{optional, (\code{numeric}) Specifies the plot width as a three-element vector of +\code{value}, \code{min}, and \code{max} for a slider encoding the plot width.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} } \description{ Module to analyze and identify outliers using different methods diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index 6965390ea..dcbc021a9 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -37,11 +37,12 @@ Defaults to \code{TRUE}.} Indicates whether to show total column. Defaults to \code{TRUE}.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} \item{basic_table_args}{(\code{basic_table_args}) object created by \code{\link[teal.widgets:basic_table_args]{teal.widgets::basic_table_args()}} with settings for the module table. diff --git a/man/tm_variable_browser.Rd b/man/tm_variable_browser.Rd index 9ea518a85..c5b6d81a7 100644 --- a/man/tm_variable_browser.Rd +++ b/man/tm_variable_browser.Rd @@ -28,11 +28,12 @@ allow users to not show variables in other datasets which exist in this \code{da This is typically used to remove \code{ADSL} columns in \code{CDISC} data. In non \code{CDISC} data this can be ignored. Defaults to \code{"ADSL"}.} -\item{pre_output}{(\code{shiny.tag}, optional)\cr +\item{pre_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed before the module's output, +providing context or a title. 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 -into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} +\item{post_output}{(\code{shiny.tag}, optional) Text or UI element to be displayed after the module's output, +adding context or further instructions. Elements like \code{shiny::helpText()} are useful.} \item{ggplot2_args}{(\code{ggplot2_args}) object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for the module plot. diff --git a/man/variable_type_icons.Rd b/man/variable_type_icons.Rd index 1b7150e9d..9d564369b 100644 --- a/man/variable_type_icons.Rd +++ b/man/variable_type_icons.Rd @@ -8,19 +8,21 @@ variable_type_icons(var_type) } \arguments{ \item{var_type}{(\code{character})\cr -of R internal types (classes).} +of \code{R} internal types (classes).} } \value{ -(\code{character})\cr -vector of HTML icons corresponding to data type in each column. +Vector of HTML icons corresponding to data type in each column. } \description{ Get icons to represent variable types in dataset } \examples{ -teal.modules.general:::variable_type_icons(c( +variable_type_icons <- getFromNamespace("variable_type_icons", "teal.modules.general") + +variable_type_icons(c( "integer", "numeric", "logical", "Date", "POSIXct", "POSIXlt", "factor", "character", "unknown", "" )) + } \keyword{internal} diff --git a/man/varname_w_label.Rd b/man/varname_w_label.Rd index 6e241bf42..f752406d7 100644 --- a/man/varname_w_label.Rd +++ b/man/varname_w_label.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/utils.R \name{varname_w_label} \alias{varname_w_label} -\title{Get variable name with label} +\title{Generate a string for a variable including its label} \usage{ varname_w_label( var_names, @@ -30,13 +30,6 @@ name with label.} (\code{character}) String with variable name and label. } \description{ -Get variable name with label -} -\examples{ -\dontrun{ -ADSL <- teal.modules.general::rADSL - -varname_w_label("AGE", ADSL) -} +Generate a string for a variable including its label } \keyword{internal}