Skip to content

Commit

Permalink
Clean up documentation for tm_t_shift_by_grade (#998)
Browse files Browse the repository at this point in the history
Fixes #970
  • Loading branch information
edelarua authored Jan 31, 2024
1 parent 9d5ac28 commit ff13787
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
31 changes: 14 additions & 17 deletions R/tm_t_shift_by_grade.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#' Template: Grade Summary Table
#'
#' Creates a valid expression to generate a grade summary table.
#'
#' @inheritParams template_arguments
#' @param worst_flag_var (`character`)\cr name of the worst flag variable.
#' @param worst_flag_indicator (`character`)\cr value indicating worst grade.
#' @param anl_toxgrade_var (`character`)\cr name of the variable indicating the analysis toxicity grade.
#' @param base_toxgrade_var (`character`)\cr name of the variable indicating the base toxicity grade.
#' @param code_missing_baseline (`character`)\cr whether missing baseline should be considered
#' as grade 0.
#' @param base_toxgrade_var (`character`)\cr name of the variable indicating the baseline toxicity grade.
#' @param code_missing_baseline (`logical`)\cr whether missing baseline grades should be counted as grade 0.
#'
#' @seealso [tm_t_shift_by_grade()]
#' @keywords internal
#'
#' @keywords internal
template_shift_by_grade <- function(parentname,
dataname,
arm_var = "ARM",
Expand Down Expand Up @@ -463,20 +462,17 @@ template_shift_by_grade <- function(parentname,

#' Teal Module: Grade Summary Table
#'
#' This module produces a summary table of worst grades per subject by visit and parameter.
#'
#' @inheritParams module_arguments
#' @inheritParams template_shift_by_grade
#' @param visit_var ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr
#' object with all available choices and preselected option for variable names that can be used as visit.
#' @param worst_flag_var ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr
#' object with all available choices and preselected option for variable names that can be used as worst flag variable.
#' @param worst_flag_indicator ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr
#' value indicating worst grade.
#' @param anl_toxgrade_var ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr
#' variable for analysis toxicity grade.
#' variable for analysis toxicity grade.
#' @param base_toxgrade_var ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr
#' variable for baseline toxicity grade.
#' variable for baseline toxicity grade.
#'
#' @return a [teal::module()] object which can be added to a `teal` app via [teal::init()].
#'
#' @export
#' @examples
#' ADSL <- tmc_ex_adsl
#' ADLB <- tmc_ex_adlb
Expand Down Expand Up @@ -529,6 +525,7 @@ template_shift_by_grade <- function(parentname,
#' shinyApp(app$ui, app$server)
#' }
#'
#' @export
tm_t_shift_by_grade <- function(label,
dataname,
parentname = ifelse(
Expand Down Expand Up @@ -624,7 +621,7 @@ tm_t_shift_by_grade <- function(label,
)
}

#' @noRd
#' @keywords internal
ui_t_shift_by_grade <- function(id, ...) {
ns <- shiny::NS(id)
a <- list(...) # module args
Expand Down Expand Up @@ -731,7 +728,7 @@ ui_t_shift_by_grade <- function(id, ...) {
)
}

#' @noRd
#' @keywords internal
srv_t_shift_by_grade <- function(id,
data,
reporter,
Expand Down
7 changes: 3 additions & 4 deletions man/template_shift_by_grade.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions man/tm_t_shift_by_grade.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff13787

Please sign in to comment.