Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

52 standardise optional notation #260

Merged
merged 15 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/argument_convention.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @param label (`character(1)`)\cr
#' menu item label of the module in the teal app.
#'
#' @param dataname (\code{character(1)})\cr
#' @param dataname (`character(1)`)\cr
#' analysis data used in the teal module, needs to be
#' available in the list passed to the `data` argument of [teal::init()].
#'
Expand Down
2 changes: 1 addition & 1 deletion R/teal.osprey.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' teal.osprey: Enabling you to write modules in teal
#'
#' The \code{teal.osprey} R package contains interactive \code{\link{teal}} modules for the outputs
#' The `teal.osprey` R package contains interactive [`teal`] modules for the outputs
#'
#' @import dplyr osprey shiny teal formatters teal.transform
#' @keywords internal
Expand Down
32 changes: 16 additions & 16 deletions R/tm_g_butterfly.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams argument_convention
#' @param filter_var (\code{choices_selected}) variable name of data filter, please see details regarding
#' expected values, default is \code{NULL}. \code{choices}
#' vector with \code{filter_var} choices, default is
#' \code{NULL}
#' @param right_var (\code{choices_selected}) dichotomization variable for right side
#' @param left_var (\code{choices_selected}) dichotomization variable for left side
#' @param category_var (\code{choices_selected}) category (y axis) variable
#' @param color_by_var (\code{choices_selected}) variable defines color blocks within each bar
#' @param count_by_var (\code{choices_selected}) variable defines how x axis is calculated
#' @param facet_var (\code{choices_selected}) variable for row facets
#' @param sort_by_var (\code{choices_selected}) argument for order of class and term elements in table,
#' @param filter_var (`choices_selected`) variable name of data filter, please see details regarding
#' expected values, default is`NULL`.`choices`
#' vector with `filter_var` choices, default is
#' `NULL`
#' @param right_var (`choices_selected`) dichotomization variable for right side
#' @param left_var (`choices_selected`) dichotomization variable for left side
#' @param category_var (`choices_selected`) category (y axis) variable
#' @param color_by_var (`choices_selected`) variable defines color blocks within each bar
#' @param count_by_var (`choices_selected`) variable defines how x axis is calculated
#' @param facet_var (`choices_selected`) variable for row facets
#' @param sort_by_var (`choices_selected`) argument for order of class and term elements in table,
#' default here is "count"
#' @param legend_on (\code{boolean}) value for whether legend is displayed
#' @param legend_on (`boolean`) value for whether legend is displayed
#'
#' @details \code{filter_var} option is designed to work in conjunction with
#' filtering function provided by \code{teal} (encoding panel on the right
#' @details `filter_var` option is designed to work in conjunction with
#' filtering function provided by `teal` (encoding panel on the right
#' hand side of the shiny app). It can be used as quick access to predefined
#' subsets of the domain datasets (not subject-level dataset) to be used for
#' analysis, denoted by an value of "Y". Each variable within the
#' \code{filter_var_choices} is expected to contain values of either "Y" or
#' "N". If multiple variables are selected as \code{filter_var}, only
#' `filter_var_choices` is expected to contain values of either "Y" or
#' "N". If multiple variables are selected as `filter_var`, only
#' observations with "Y" value in each and every selected variables will be
#' used for subsequent analysis. Flag variables (from `ADaM` datasets) can be
#' used directly as filter.
Expand Down
18 changes: 9 additions & 9 deletions R/tm_g_decorate.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#' @description
#' `r lifecycle::badge("stable")`
#'
#' This is used in \code{\link{tm_g_ae_oview}} and \code{\link{tm_g_events_term_id}}.
#' This is used in [tm_g_ae_oview()] and [tm_g_events_term_id()].
#'
#' @param id (\code{character}) id of this module. set to `NULL` if you want to make it identical
#' @param id (`character`) id of this module. set to `NULL` if you want to make it identical
#' to the module who called it.
#' @param titles (\code{character}) default titles
#' @param footnotes (\code{character}) default footnotes
#' @param titles (`character`) default titles
#' @param footnotes (`character`) default footnotes
#' @inheritParams argument_convention
#' @export
ui_g_decorate <- function(id,
Expand All @@ -33,12 +33,12 @@ ui_g_decorate <- function(id,
#' @description
#' `r lifecycle::badge("stable")`
#'
#' This is used in \code{\link{tm_g_ae_oview}} and \code{\link{tm_g_events_term_id}}.
#' This is used in [tm_g_ae_oview()] and [tm_g_events_term_id()].
#'
#' @inheritParams shared_params
#' @param id (\code{character}) id of the module
#' @param plot_id (\code{character}) id for plot output
#' @param plt (\code{reactive}) a reactive object of graph object
#' @param id (`character`) id of the module
#' @param plot_id (`character`) id for plot output
#' @param plt (`reactive`) a reactive object of graph object
#'
#' @export
srv_g_decorate <- function(id,
Expand Down Expand Up @@ -90,7 +90,7 @@ srv_g_decorate <- function(id,
#' @description
#' `r lifecycle::badge("stable")`
#'
#' @param id (\code{character}) id of this element
#' @param id (`character`) id of this element
#'
#' @export
plot_decorate_output <- function(id) {
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_events_term_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams argument_convention
#' @param term_var \code{\link[teal.transform]{choices_selected}} object with all available choices
#' @param term_var [teal.transform::choices_selected] object with all available choices
#' and pre-selected option names that can be used to specify the term for events
#'
#' @inherit argument_convention return
Expand Down
42 changes: 21 additions & 21 deletions R/tm_g_heat_bygrade.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams argument_convention
#' @param sl_dataname (\code{character}) subject level dataset name,
#' needs to be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}}
#' @param ex_dataname (\code{character}) exposures dataset name,
#' needs to be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}} \cr
#' @param ae_dataname (\code{character}) adverse events dataset name,
#' needs to be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}} \cr
#' @param cm_dataname (\code{character}) concomitant medications dataset name,
#' needs to be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}} \cr
#' specify to \code{NA} if no concomitant medications data is available
#' @param id_var (\code{choices_seleced}) unique subject ID variable
#' @param visit_var (\code{choices_seleced}) analysis visit variable
#' @param ongo_var (\code{choices_seleced}) study ongoing status variable,
#' This variable is a derived logical variable. Usually it can be derived from \code{EOSSTT}.
#' @param anno_var (\code{choices_seleced}) annotation variable
#' @param heat_var (\code{choices_seleced}) heatmap variable
#' @param conmed_var (\code{choices_seleced}) concomitant medications variable,
#' specify to \code{NA} if no concomitant medications data is available
#' @param sl_dataname (`character`) subject level dataset name,
#' needs to be available in the list passed to the `data`
#' argument of [teal::init()]
#' @param ex_dataname (`character`) exposures dataset name,
#' needs to be available in the list passed to the `data`
#' argument of [teal::init()] \cr
#' @param ae_dataname (`character`) adverse events dataset name,
#' needs to be available in the list passed to the `data`
#' argument of [teal::init()] \cr
#' @param cm_dataname (`character`) concomitant medications dataset name,
#' needs to be available in the list passed to the `data`
#' argument of [teal::init()] \cr
#' specify to `NA` if no concomitant medications data is available
#' @param id_var (`choices_seleced`) unique subject ID variable
#' @param visit_var (`choices_seleced`) analysis visit variable
#' @param ongo_var (`choices_seleced`) study ongoing status variable,
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' This variable is a derived logical variable. Usually it can be derived from `EOSSTT`.
#' @param anno_var (`choices_seleced`) annotation variable
#' @param heat_var (`choices_seleced`) heatmap variable
#' @param conmed_var (`choices_seleced`) concomitant medications variable,
#' specify to `NA` if no concomitant medications data is available
#'
#' @inherit argument_convention return
#'
Expand Down
60 changes: 29 additions & 31 deletions R/tm_g_patient_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams argument_convention
#' @param patient_id (\code{choices_seleced}) unique subject ID variable
#' @param sl_dataname (\code{character}) subject level dataset name,
#' needs to be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}}
#' @param patient_id (`choices_seleced`) unique subject ID variable
#' @param sl_dataname (`character`) subject level dataset name,
#' needs to be available in the list passed to the `data`
#' argument of [teal::init()]
#' @param ex_dataname,ae_dataname,rs_dataname,cm_dataname,lb_dataname
#' (\code{character(1)}) names of exposure, adverse events, response,
#' (`character(1)`) names of exposure, adverse events, response,
#' concomitant medications, and labs datasets, respectively;
#' must be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}}\cr
#' must be available in the list passed to the `data`
#' argument of [teal::init()]\cr
#' set to NA (default) to omit from analysis
#' @param sl_start_date (\code{choices_selected}) study start date variable, usually set to
#' @param sl_start_date `choices_selected` study start date variable, usually set to
#' treatment start date or randomization date
#' @param ex_var (\code{choices_selected}) exposure variable to plot as each line \cr
#' leave unspecified or set to \code{NULL} if exposure data is not available
#' @param ae_var (\code{choices_selected}) adverse event variable to plot as each line \cr
#' leave unspecified or set to \code{NULL} if adverse events data is not available
#' @param ae_line_col_var (\code{choices_selected}) variable for coloring `AE` lines \cr
#' leave unspecified or set to \code{NULL} if adverse events data is not available
#' @param ex_var `choices_selected` exposure variable to plot as each line \cr
#' leave unspecified or set to `NULL` if exposure data is not available
#' @param ae_var `choices_selected` adverse event variable to plot as each line \cr
#' leave unspecified or set to `NULL` if adverse events data is not available
#' @param ae_line_col_var `choices_selected` variable for coloring `AE` lines \cr
#' leave unspecified or set to `NULL` if adverse events data is not available
#' @param ae_line_col_opt aesthetic values to map color values
#' (named vector to map color values to each name).
#' If not \code{NULL}, please make sure this contains all possible
#' values for \code{ae_line_col_var} values. \cr
#' leave unspecified or set to \code{NULL} if adverse events data is not available
#' @param rs_var (\code{choices_selected}) response variable to plot as each line \cr
#' leave unspecified or set to \code{NULL} if response data is not available
#' @param cm_var (\code{choices_selected}) concomitant medication variable
#' If not `NULL`, please make sure this contains all possible
#' values for `ae_line_col_var` values. \cr
#' leave unspecified or set to `NULL` if adverse events data is not available
#' @param rs_var `choices_selected` response variable to plot as each line \cr
#' leave unspecified or set to `NULL` if response data is not available
#' @param cm_var `choices_selected` concomitant medication variable
#' to plot as each line \cr
#' leave unspecified or set to \code{NULL} if concomitant medications data is not available
#' @param lb_var (\code{choices_selected}) lab variable to plot as each line \cr
#' leave unspecified or set to \code{NULL} if labs data is not available
#' @param x_limit a single \code{character} string with two numbers
#' leave unspecified or set to `NULL` if concomitant medications data is not available
#' @param lb_var `choices_selected` lab variable to plot as each line \cr
#' leave unspecified or set to `NULL` if labs data is not available
#' @param x_limit a single `character` string with two numbers
#' separated by a comma indicating the x-axis limit,
#' default is \code{"-28, 365"}
#' default is "-28, 365"
#'
#' @author Xuefeng Hou (houx14) \email{[email protected]}
#' @author Tina Cho (chot) \email{[email protected]}
Expand All @@ -51,13 +51,11 @@
#' @details
#' As the patient profile module plots different domains in one plot, the study day (x-axis)
#' is derived for consistency based the start date of user's choice in the app (for example,
#' \code{ADSL.RANDDT} or \code{ADSL.TRTSDT}):
#' \itemize{
#' \item In \code{ADAE}, \code{ADEX}, and \code{ADCM}, it would be study day based on \code{ASTDT} and/or
#' \code{AENDT} in reference to the start date
#' \item In \code{ADRS} and \code{ADLB}, it would be study day based on \code{ADT} in reference to
#' `ADSL.RANDDT` or `ADSL.TRTSDT`):
#' - In `ADAE`, `ADEX`, and `ADCM`, it would be study day based on `ASTDT` and/or
#' `AENDT` in reference to the start date
#' - In `ADRS` and `ADLB`, it would be study day based on `ADT` in reference to
#' the start date
#' }
#'
#' @export
#'
Expand Down
24 changes: 12 additions & 12 deletions R/tm_g_swimlane.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
#'
#' @inheritParams teal.widgets::standard_layout
#' @inheritParams argument_convention
#' @param dataname analysis data used for plotting, needs to be available in the list passed to the \code{data}
#' argument of \code{\link[teal]{init}}. If no markers are to be plotted in the module, `"ADSL"` should be
#' @param dataname analysis data used for plotting, needs to be available in the list passed to the `data`
#' argument of [teal::init()]. If no markers are to be plotted in the module, `"ADSL"` should be
#' the input. If markers are to be plotted, data name for the marker data should be the input
#' @param bar_var (\code{\link[teal.transform]{choices_selected}}) subject-level numeric variable from dataset
#' @param bar_var [teal.transform::choices_selected] subject-level numeric variable from dataset
#' to plot as the bar length
#' @param bar_color_var (\code{\link[teal.transform]{choices_selected}}) color by variable (subject-level)
#' @param sort_var (\code{choices_selected}) sort by variable (subject-level)
#' @param marker_pos_var (\code{\link[teal.transform]{choices_selected}}) variable for marker position from marker data
#' (Note: make sure that marker position has the same relative start day as bar length variable \code{bar_var})
#' @param marker_shape_var (\code{\link[teal.transform]{choices_selected}}) marker shape variable from marker data
#' @param bar_color_var [teal.transform::choices_selected] color by variable (subject-level)
#' @param sort_var `choices_selected` sort by variable (subject-level)
#' @param marker_pos_var [teal.transform::choices_selected] variable for marker position from marker data
#' (Note: make sure that marker position has the same relative start day as bar length variable `bar_var`
#' @param marker_shape_var [teal.transform::choices_selected] marker shape variable from marker data
#' @param marker_shape_opt aesthetic values to map shape values (named vector to map shape values to each name).
#' If not \code{NULL}, please make sure this contains all possible values for \code{marker_shape_var} values,
#' otherwise shape will be assigned by \code{ggplot} default
#' If not `NULL`, please make sure this contains all possible values for `marker_shape_var` values,
#' otherwise shape will be assigned by `ggplot` default
#' @param marker_color_var marker color variable from marker data
#' @param marker_color_opt aesthetic values to map color values (named vector to map color values to each name).
#' If not \code{NULL}, please make sure this contains all possible values for \code{marker_color_var} values,
#' otherwise color will be assigned by \code{ggplot} default
#' If not `NULL`, please make sure this contains all possible values for `marker_color_var` values,
#' otherwise color will be assigned by `ggplot` default
#' @param vref_line vertical reference lines
#' @param anno_txt_var character vector with subject-level variable names that are selected as annotation
#' @param x_label the label of the x axis
Expand Down
Loading
Loading