From d30234b228a126f95ce068f04236cb6068e56812 Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 1 Feb 2024 18:00:56 -0500 Subject: [PATCH 1/3] Clean up documentation for tm_g_pp_therapy --- R/argument_convention.R | 16 +++++++++++ R/tm_g_pp_therapy.R | 60 ++++++++++++++++----------------------- man/module_arguments.Rd | 16 +++++++++++ man/template_arguments.Rd | 12 ++++++++ man/template_g_km.Rd | 2 +- man/template_therapy.Rd | 14 ++++++--- man/tm_g_pp_therapy.Rd | 51 +++++++++++++++++---------------- 7 files changed, 107 insertions(+), 64 deletions(-) diff --git a/R/argument_convention.R b/R/argument_convention.R index a5e1ea69ca..868d558519 100644 --- a/R/argument_convention.R +++ b/R/argument_convention.R @@ -12,6 +12,7 @@ #' @param add_total (`logical`)\cr whether to include column with total number of patients. #' @param anl_name (`character`)\cr analysis data used in teal module. #' @param arm_var (`character`)\cr variable names that can be used as `arm_var`. +#' @param atirel (`character`)\cr name of time relation of medication variable. #' @param aval `r lifecycle::badge("deprecated")` Please use the `aval_var` argument instead. #' @param avalu `r lifecycle::badge("deprecated")` Please use the `avalu_var` argument instead. #' @param avalu_var (`character`)\cr name of the analysis value unit variable. @@ -23,6 +24,9 @@ #' #' For more details, see the vignette: `vignette("custom-basic-table-arguments", package = "teal.widgets")`. #' @param by_vars (`character`)\cr variable names used to split the summary by rows. +#' @param cmdecod (`character`)\cr name of standardized medication name variable. +#' @param cmindc (`character`)\cr name of indication variable. +#' @param cmstdy (`character`)\cr name of study relative day of start of medication variable. #' @param cnsr_var (`character`)\cr name of the censoring variable. #' @param combine_comp_arms (`logical`)\cr triggers the combination of comparison arms. #' @param compare_arm (`logical`)\cr triggers the comparison between study arms. @@ -37,6 +41,7 @@ #' @param drop_arm_levels (`logical`)\cr drop the unused `arm_var` levels. #' When `TRUE`, `arm_var` levels are set to those used in the `dataname` dataset. When `FALSE`, #' `arm_var` levels are set to those used in the `parantname` dataset. +#' @param font_size (`numeric`)\cr font size value. #' @param ggplot2_args optional, (`ggplot2_args`)\cr object created by [teal.widgets::ggplot2_args()] with settings #' for the module plot. The argument is merged with option `teal.ggplot2_args` and with default module arguments #' (hard coded in the module body). @@ -50,6 +55,7 @@ #' @param interact_y (`character`)\cr a selected item from the interact_var column which will be used to select the #' specific `ANCOVA` results. If the interaction is not needed, the default option is `FALSE`. #' @param llt (`character`)\cr name of the variable with low level term for events. +#' @param patient_id (`character`)\cr patient ID. #' @param na_level (`string`)\cr used to replace all `NA` or empty values #' in character or factor variables in the data. Defaults to `""`. To set a #' default `na_level` to apply in all modules, run `set_default_na_str("new_default")`. @@ -110,6 +116,8 @@ NULL #' It defines the grouping variable(s) in the results table. #' If there are two elements selected for `arm_var`, #' second variable will be nested under the first variable. +#' @param atirel ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `ATIREL` variable from `dataname`. #' @param aval_var (`choices_selected` or `data_extract_spec`)\cr object with all available choices and preselected #' option for the analysis variable. #' @param avisit (`choices_selected` or `data_extract_spec`)\cr value of analysis visit `AVISIT` of interest. @@ -117,6 +125,12 @@ NULL #' all available choices and preselected option for variable values that can be used as `baseline_var`. #' @param by_vars (`choices_selected` or `data_extract_spec`)\cr object with all available choices and preselected #' option for variable names used to split the summary by rows. +#' @param cmdecod ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMDECOD` variable from `dataname`. +#' @param cmindc ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMINDC` variable from `dataname`. +#' @param cmstdy ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMSTDY` variable from `dataname`. #' @param cnsr_var (`choices_selected` or `data_extract_spec`)\cr object with all available choices and preselected #' option for the censoring variable. #' @param conf_level (`choices_selected`)\cr object with all available choices and preselected option for the @@ -131,6 +145,7 @@ NULL #' values and `levels` of default level choices. #' @param fixed_symbol_size (`logical`)\cr When (`TRUE`), the same symbol size is used for plotting each estimate. #' Otherwise, the symbol size will be proportional to the sample size in each each subgroup. +#' @param font_size (`numeric`)\cr numeric vector of length 3 of current, minimum and maximum font size values. #' @param hlt (`choices_selected` or `data_extract_spec`)\cr name of the variable with high level term for events. #' @param id_var (`choices_selected` or `data_extract_spec`)\cr object specifying the variable name for subject id. #' @param interact_var (`character`)\cr name of the variable that should have interactions @@ -142,6 +157,7 @@ NULL #' @param llt (`choices_selected` or `data_extract_spec`)\cr name of the variable with low level term for events. #' @param paramcd (`choices_selected` or `data_extract_spec`)\cr variable value designating the studied parameter. #' @param parentname (`character`)\cr parent analysis data used in teal module, usually this refers to `ADSL`. +#' @param patient_col (`character`)\cr name of patient ID variable. #' @param plot_height optional, (`numeric`)\cr a vector of length three with `c(value, min, max)`. Specifies the #' height of the main plot and renders a slider on the plot to interactively adjust the plot height. #' @param plot_width optional, (`numeric`)\cr a vector of length three with `c(value, min, max)`. Specifies the width diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 8504b26c12..654426cd28 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -1,22 +1,20 @@ -#' Template: Therapy +#' Template: Patient Profile Therapy Plot #' -#' Creates a therapy template call. +#' Creates a valid expression to generate a [ggplot2::ggplot()] patient profile therapy plot using ADaM datasets. #' #' @inheritParams template_arguments -#' @param atirel (`character`)\cr name of time relation of medication variable. -#' @param cmdecod (`character`)\cr name of standardized medication name variable. -#' @param cmindc (`character`)\cr name of indication variable. #' @param cmdose (`character`)\cr name of dose per administration variable. #' @param cmtrt (`character`)\cr name of reported name of drug, med, or therapy variable. #' @param cmdosu (`character`)\cr name of dose units variable. #' @param cmroute (`character`)\cr name of route of administration variable. #' @param cmdosfrq (`character`)\cr name of dosing frequency per interval variable. -#' @param cmstdy (`character`)\cr name of study day of start of medication variable. #' @param cmendy (`character`)\cr name of study day of end of medication variable. -#' @param patient_id (`character`)\cr patient ID. -#' @param font_size (`numeric`)\cr numeric vector of length 3 for current, min and max font size values. -#' @keywords internal #' +#' @inherit template_arguments return +#' +#' @seealso [tm_g_pp_therapy()] +#' +#' @keywords internal template_therapy <- function(dataname = "ANL", atirel = "ATIREL", cmdecod = "CMDECOD", @@ -230,36 +228,26 @@ template_therapy <- function(dataname = "ANL", y } -#' Teal Module: Patient Profile Therapy Teal Module +#' teal Module: Patient Profile Therapy Plot #' -#' This teal module produces a patient profile therapy plot using `ADaM` datasets. +#' This module produces a [ggplot2::ggplot()] type patient profile therapy plot using ADaM datasets. #' #' @inheritParams module_arguments #' @inheritParams template_therapy -#' @param patient_col (`character`)\cr patient ID column to be used. -#' @param atirel ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `ATIREL` column of the `ADCM` dataset. -#' @param cmdecod ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMDECOD` column of the `ADCM` dataset. -#' @param cmdose ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMDOSE` column of the `ADCM` dataset. -#' @param cmtrt ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMTRT` column of the `ADCM` dataset. -#' @param cmdosu ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMDOSU` column of the `ADCM` dataset. -#' @param cmroute ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMROUTE` column of the `ADCM` dataset. -#' @param cmdosfrq ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMDOSFRQ` column of the `ADCM` dataset. -#' @param cmstdy ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMSTDY` column of the `ADCM` dataset. -#' @param cmendy ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMENDY` column of the `ADCM` dataset. -#' @param cmindc ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr -#' `CMINDC` column of the `ADCM` dataset. -#' @param font_size (`numeric`)\cr numeric vector of length 3 for current, min and max font size values. +#' @param cmdose ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMDOSE` variable from `dataname`. +#' @param cmtrt ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMTRT` variable from `dataname`. +#' @param cmdosu ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMDOSU` variable from `dataname`. +#' @param cmroute ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMROUTE` variable from `dataname`. +#' @param cmdosfrq ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMDOSFRQ` variable from `dataname`. +#' @param cmendy ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr object with all +#' available choices and preselected option for the `CMENDY` variable from `dataname`. #' -#' @export +#' @inherit module_arguments return #' #' @examples #' library(nestcolor) @@ -339,6 +327,7 @@ template_therapy <- function(dataname = "ANL", #' shinyApp(app$ui, app$server) #' } #' +#' @export tm_g_pp_therapy <- function(label, dataname = "ADCM", parentname = "ADSL", @@ -412,6 +401,7 @@ tm_g_pp_therapy <- function(label, ) } +#' @keywords internal ui_g_therapy <- function(id, ...) { ui_args <- list(...) is_single_dataset_value <- teal.transform::is_single_dataset( @@ -531,7 +521,7 @@ ui_g_therapy <- function(id, ...) { ) } - +#' @keywords internal srv_g_therapy <- function(id, data, reporter, diff --git a/man/module_arguments.Rd b/man/module_arguments.Rd index e17351692d..ec1e646c46 100644 --- a/man/module_arguments.Rd +++ b/man/module_arguments.Rd @@ -16,6 +16,9 @@ It defines the grouping variable(s) in the results table. If there are two elements selected for \code{arm_var}, second variable will be nested under the first variable.} +\item{atirel}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{ATIREL} variable from \code{dataname}.} + \item{aval_var}{(\code{choices_selected} or \code{data_extract_spec})\cr object with all available choices and preselected option for the analysis variable.} @@ -27,6 +30,15 @@ all available choices and preselected option for variable values that can be use \item{by_vars}{(\code{choices_selected} or \code{data_extract_spec})\cr object with all available choices and preselected option for variable names used to split the summary by rows.} +\item{cmdecod}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMDECOD} variable from \code{dataname}.} + +\item{cmindc}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMINDC} variable from \code{dataname}.} + +\item{cmstdy}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMSTDY} variable from \code{dataname}.} + \item{cnsr_var}{(\code{choices_selected} or \code{data_extract_spec})\cr object with all available choices and preselected option for the censoring variable.} @@ -46,6 +58,8 @@ values and \code{levels} of default level choices.} \item{fixed_symbol_size}{(\code{logical})\cr When (\code{TRUE}), the same symbol size is used for plotting each estimate. Otherwise, the symbol size will be proportional to the sample size in each each subgroup.} +\item{font_size}{(\code{numeric})\cr numeric vector of length 3 of current, minimum and maximum font size values.} + \item{hlt}{(\code{choices_selected} or \code{data_extract_spec})\cr name of the variable with high level term for events.} \item{id_var}{(\code{choices_selected} or \code{data_extract_spec})\cr object specifying the variable name for subject id.} @@ -65,6 +79,8 @@ needed, the default option is \code{FALSE}.} \item{parentname}{(\code{character})\cr parent analysis data used in teal module, usually this refers to \code{ADSL}.} +\item{patient_col}{(\code{character})\cr name of patient ID variable.} + \item{plot_height}{optional, (\code{numeric})\cr a vector of length three with \code{c(value, min, max)}. Specifies the height of the main plot and renders a slider on the plot to interactively adjust the plot height.} diff --git a/man/template_arguments.Rd b/man/template_arguments.Rd index 7aa0f33bd6..9e8ef4cd07 100644 --- a/man/template_arguments.Rd +++ b/man/template_arguments.Rd @@ -10,6 +10,8 @@ \item{arm_var}{(\code{character})\cr variable names that can be used as \code{arm_var}.} +\item{atirel}{(\code{character})\cr name of time relation of medication variable.} + \item{aval}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{aval_var} argument instead.} \item{avalu}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{avalu_var} argument instead.} @@ -28,6 +30,12 @@ For more details, see the vignette: \code{vignette("custom-basic-table-arguments \item{by_vars}{(\code{character})\cr variable names used to split the summary by rows.} +\item{cmdecod}{(\code{character})\cr name of standardized medication name variable.} + +\item{cmindc}{(\code{character})\cr name of indication variable.} + +\item{cmstdy}{(\code{character})\cr name of study relative day of start of medication variable.} + \item{cnsr_var}{(\code{character})\cr name of the censoring variable.} \item{combine_comp_arms}{(\code{logical})\cr triggers the combination of comparison arms.} @@ -51,6 +59,8 @@ percentage is omitted.} When \code{TRUE}, \code{arm_var} levels are set to those used in the \code{dataname} dataset. When \code{FALSE}, \code{arm_var} levels are set to those used in the \code{parantname} dataset.} +\item{font_size}{(\code{numeric})\cr font size value.} + \item{ggplot2_args}{optional, (\code{ggplot2_args})\cr object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for the module plot. The argument is merged with option \code{teal.ggplot2_args} and with default module arguments (hard coded in the module body). @@ -71,6 +81,8 @@ specific \code{ANCOVA} results. If the interaction is not needed, the default op \item{llt}{(\code{character})\cr name of the variable with low level term for events.} +\item{patient_id}{(\code{character})\cr patient ID.} + \item{na_level}{(\code{string})\cr used to replace all \code{NA} or empty values in character or factor variables in the data. Defaults to \code{""}. To set a default \code{na_level} to apply in all modules, run \code{set_default_na_str("new_default")}.} diff --git a/man/template_g_km.Rd b/man/template_g_km.Rd index 35d72b182c..ca8a921f22 100644 --- a/man/template_g_km.Rd +++ b/man/template_g_km.Rd @@ -61,7 +61,7 @@ an optimal tick position on the x axis.} object with all available choices and preselected option for variable names that can be used for facet plotting.} -\item{font_size}{(\code{number})\cr font size to be used.} +\item{font_size}{(\code{numeric})\cr font size value.} \item{conf_level}{(\code{numeric})\cr value for the confidence level within the range of (0, 1).} diff --git a/man/template_therapy.Rd b/man/template_therapy.Rd index 53248b12d0..1ca697aed9 100644 --- a/man/template_therapy.Rd +++ b/man/template_therapy.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/tm_g_pp_therapy.R \name{template_therapy} \alias{template_therapy} -\title{Template: Therapy} +\title{Template: Patient Profile Therapy Plot} \usage{ template_therapy( dataname = "ANL", @@ -40,13 +40,13 @@ template_therapy( \item{cmdosfrq}{(\code{character})\cr name of dosing frequency per interval variable.} -\item{cmstdy}{(\code{character})\cr name of study day of start of medication variable.} +\item{cmstdy}{(\code{character})\cr name of study relative day of start of medication variable.} \item{cmendy}{(\code{character})\cr name of study day of end of medication variable.} \item{patient_id}{(\code{character})\cr patient ID.} -\item{font_size}{(\code{numeric})\cr numeric vector of length 3 for current, min and max font size values.} +\item{font_size}{(\code{numeric})\cr font size value.} \item{ggplot2_args}{optional, (\code{ggplot2_args})\cr object created by \code{\link[teal.widgets:ggplot2_args]{teal.widgets::ggplot2_args()}} with settings for the module plot. The argument is merged with option \code{teal.ggplot2_args} and with default module arguments @@ -54,7 +54,13 @@ for the module plot. The argument is merged with option \code{teal.ggplot2_args} For more details, see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}.} } +\value{ +a \code{list} of expressions to generate a table or plot object. +} \description{ -Creates a therapy template call. +Creates a valid expression to generate a \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} patient profile therapy plot using ADaM datasets. +} +\seealso{ +\code{\link[=tm_g_pp_therapy]{tm_g_pp_therapy()}} } \keyword{internal} diff --git a/man/tm_g_pp_therapy.Rd b/man/tm_g_pp_therapy.Rd index 04054d4e65..3925da1ac5 100644 --- a/man/tm_g_pp_therapy.Rd +++ b/man/tm_g_pp_therapy.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/tm_g_pp_therapy.R \name{tm_g_pp_therapy} \alias{tm_g_pp_therapy} -\title{Teal Module: Patient Profile Therapy Teal Module} +\title{teal Module: Patient Profile Therapy Plot} \usage{ tm_g_pp_therapy( label, @@ -34,39 +34,39 @@ tm_g_pp_therapy( \item{parentname}{(\code{character})\cr parent analysis data used in teal module, usually this refers to \code{ADSL}.} -\item{patient_col}{(\code{character})\cr patient ID column to be used.} +\item{patient_col}{(\code{character})\cr name of patient ID variable.} -\item{atirel}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{ATIREL} column of the \code{ADCM} dataset.} +\item{atirel}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{ATIREL} variable from \code{dataname}.} -\item{cmdecod}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMDECOD} column of the \code{ADCM} dataset.} +\item{cmdecod}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMDECOD} variable from \code{dataname}.} -\item{cmindc}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMINDC} column of the \code{ADCM} dataset.} +\item{cmindc}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMINDC} variable from \code{dataname}.} -\item{cmdose}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMDOSE} column of the \code{ADCM} dataset.} +\item{cmdose}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMDOSE} variable from \code{dataname}.} -\item{cmtrt}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMTRT} column of the \code{ADCM} dataset.} +\item{cmtrt}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMTRT} variable from \code{dataname}.} -\item{cmdosu}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMDOSU} column of the \code{ADCM} dataset.} +\item{cmdosu}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMDOSU} variable from \code{dataname}.} -\item{cmroute}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMROUTE} column of the \code{ADCM} dataset.} +\item{cmroute}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMROUTE} variable from \code{dataname}.} -\item{cmdosfrq}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMDOSFRQ} column of the \code{ADCM} dataset.} +\item{cmdosfrq}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMDOSFRQ} variable from \code{dataname}.} -\item{cmstdy}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMSTDY} column of the \code{ADCM} dataset.} +\item{cmstdy}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMSTDY} variable from \code{dataname}.} -\item{cmendy}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr -\code{CMENDY} column of the \code{ADCM} dataset.} +\item{cmendy}{(\code{\link[teal.transform:choices_selected]{teal.transform::choices_selected()}} or \code{\link[teal.transform:data_extract_spec]{teal.transform::data_extract_spec()}})\cr object with all +available choices and preselected option for the \code{CMENDY} variable from \code{dataname}.} -\item{font_size}{(\code{numeric})\cr numeric vector of length 3 for current, min and max font size values.} +\item{font_size}{(\code{numeric})\cr numeric vector of length 3 of current, minimum and maximum font size values.} \item{plot_height}{optional, (\code{numeric})\cr a vector of length three with \code{c(value, min, max)}. Specifies the height of the main plot and renders a slider on the plot to interactively adjust the plot height.} @@ -86,8 +86,11 @@ for the module plot. The argument is merged with option \code{teal.ggplot2_args} For more details, see the vignette: \code{vignette("custom-ggplot2-arguments", package = "teal.widgets")}.} } +\value{ +a \code{teal_module} object. +} \description{ -This teal module produces a patient profile therapy plot using \code{ADaM} datasets. +This module produces a \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} type patient profile therapy plot using ADaM datasets. } \examples{ library(nestcolor) From 46145dd8d1c3b3bc109b3ddbdb50cf958c68d42c Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 1 Feb 2024 18:23:51 -0500 Subject: [PATCH 2/3] Update title --- R/tm_g_pp_therapy.R | 9 +++++---- man/template_therapy.Rd | 5 +++-- man/tm_g_pp_therapy.Rd | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index 654426cd28..0fcf150a7b 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -1,6 +1,7 @@ -#' Template: Patient Profile Therapy Plot +#' Template: Patient Profile Therapy Table and Plot #' -#' Creates a valid expression to generate a [ggplot2::ggplot()] patient profile therapy plot using ADaM datasets. +#' Creates a valid expression to generate a patient profile therapy table and [ggplot2::ggplot()] plot using ADaM +#' datasets. #' #' @inheritParams template_arguments #' @param cmdose (`character`)\cr name of dose per administration variable. @@ -228,9 +229,9 @@ template_therapy <- function(dataname = "ANL", y } -#' teal Module: Patient Profile Therapy Plot +#' teal Module: Patient Profile Therapy Table and Plot #' -#' This module produces a [ggplot2::ggplot()] type patient profile therapy plot using ADaM datasets. +#' This module produces a patient profile therapy table and [ggplot2::ggplot()] type plot using ADaM datasets. #' #' @inheritParams module_arguments #' @inheritParams template_therapy diff --git a/man/template_therapy.Rd b/man/template_therapy.Rd index 1ca697aed9..f56ccbca6d 100644 --- a/man/template_therapy.Rd +++ b/man/template_therapy.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/tm_g_pp_therapy.R \name{template_therapy} \alias{template_therapy} -\title{Template: Patient Profile Therapy Plot} +\title{Template: Patient Profile Therapy Table and Plot} \usage{ template_therapy( dataname = "ANL", @@ -58,7 +58,8 @@ For more details, see the vignette: \code{vignette("custom-ggplot2-arguments", p a \code{list} of expressions to generate a table or plot object. } \description{ -Creates a valid expression to generate a \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} patient profile therapy plot using ADaM datasets. +Creates a valid expression to generate a patient profile therapy table and \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} plot using ADaM +datasets. } \seealso{ \code{\link[=tm_g_pp_therapy]{tm_g_pp_therapy()}} diff --git a/man/tm_g_pp_therapy.Rd b/man/tm_g_pp_therapy.Rd index 3925da1ac5..807555e2be 100644 --- a/man/tm_g_pp_therapy.Rd +++ b/man/tm_g_pp_therapy.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/tm_g_pp_therapy.R \name{tm_g_pp_therapy} \alias{tm_g_pp_therapy} -\title{teal Module: Patient Profile Therapy Plot} +\title{teal Module: Patient Profile Therapy Table and Plot} \usage{ tm_g_pp_therapy( label, @@ -90,7 +90,7 @@ For more details, see the vignette: \code{vignette("custom-ggplot2-arguments", p a \code{teal_module} object. } \description{ -This module produces a \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} type patient profile therapy plot using ADaM datasets. +This module produces a patient profile therapy table and \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} type plot using ADaM datasets. } \examples{ library(nestcolor) From f69df3834d04bf3b61933c6df6bec725a804ee42 Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Fri, 2 Feb 2024 11:24:48 -0500 Subject: [PATCH 3/3] Update docs --- man/template_arguments.Rd | 2 -- 1 file changed, 2 deletions(-) diff --git a/man/template_arguments.Rd b/man/template_arguments.Rd index 7da0a458b9..261cde7fa0 100644 --- a/man/template_arguments.Rd +++ b/man/template_arguments.Rd @@ -82,8 +82,6 @@ specific \code{ANCOVA} results. If the interaction is not needed, the default op \item{llt}{(\code{character})\cr name of the variable with low level term for events.} -\item{patient_id}{(\code{character})\cr patient ID.} - \item{na_level}{(\code{string})\cr used to replace all \code{NA} or empty values in character or factor variables in the data. Defaults to \code{""}. To set a default \code{na_level} to apply in all modules, run \code{set_default_na_str("new_default")}.}