Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
30 changes: 19 additions & 11 deletions R/tm_t_shift_by_arm.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#' Template: Shift by Arm
#'
#' Creates a valid expression to generate a summary table of analysis indicator levels by arm.
#'
#' @inheritParams template_arguments
#' @param aval_var (`character`)\cr the variable name for the analysis reference range indicator.
#' @param baseline_var (`character`)\cr the variable name for the baseline reference range indicator.
#' @param add_total (`logical`)\cr
#' whether to include row with total number of patients.
#' @param aval_var (`character`)\cr name of the analysis reference range indicator variable.
#' @param baseline_var (`character`)\cr name of the baseline reference range indicator variable.
#' @param add_total (`logical`)\cr whether to include row with total number of patients.
#'
#' @inherit template_arguments return
#'
#' @seealso [tm_t_shift_by_arm()]
#' @keywords internal
#'
#' @keywords internal
template_shift_by_arm <- function(dataname,
parentname,
arm_var = "ARM",
Expand Down Expand Up @@ -175,14 +178,18 @@ template_shift_by_arm <- function(dataname,
y
}

#' Teal Module: Shift by Arm
#' teal Module: Shift by Arm
#'
#' This module produces a summary table of analysis indicator levels by arm.
#'
#' @inheritParams module_arguments
#' @inheritParams template_shift_by_arm
#' @param add_total (`logical`)\cr
#' whether to include row with total number of patients.
#'
#' @export
#' @inherit module_arguments return
#'
#' @seealso The [TLG Catalog](https://insightsengineering.github.io/tlg-catalog/stable/) where additional example
#' apps implementing this module can be found.
#'
#' @examples
#' ADSL <- tmc_ex_adsl
#' ADEG <- tmc_ex_adeg
Expand Down Expand Up @@ -228,6 +235,7 @@ template_shift_by_arm <- function(dataname,
#' shinyApp(app$ui, app$server)
#' }
#'
#' @export
tm_t_shift_by_arm <- function(label,
dataname,
parentname = ifelse(
Expand Down Expand Up @@ -309,7 +317,7 @@ tm_t_shift_by_arm <- function(label,
)
}

#' @noRd
#' @keywords internal
ui_shift_by_arm <- function(id, ...) {
ns <- shiny::NS(id)
a <- list(...)
Expand Down Expand Up @@ -399,7 +407,7 @@ ui_shift_by_arm <- function(id, ...) {
)
}

#' @noRd
#' @keywords internal
srv_shift_by_arm <- function(id,
data,
reporter,
Expand Down
9 changes: 3 additions & 6 deletions R/tm_t_shift_by_arm_by_worst.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#' Template: Shift by Arm
#' Template: Shift by Arm by Worst Analysis Indicator Level
#'
#' Creates a valid expression to generate a summary table of analysis indicator levels by arm.
#' Creates a valid expression to generate a summary table of worst analysis indicator variable level per subject by arm.
#'
#' @inheritParams template_shift_by_arm
#' @inheritParams template_arguments
#' @param add_total (`logical`)\cr whether to include row with total number of patients.
#' @param aval_var (`character`)\cr name of the analysis reference range indicator variable.
#' @param baseline_var (`character`)\cr name of the baseline reference range indicator variable.
#' @param worst_flag (`character`)\cr value indicating worst analysis indicator level.
#'
#' @inherit template_arguments return
Expand Down Expand Up @@ -192,7 +190,6 @@ template_shift_by_arm_by_worst <- function(dataname,
#'
#' @inheritParams module_arguments
#' @inheritParams template_shift_by_arm_by_worst
#' @param add_total (`logical`)\cr whether to include row with total number of patients.
#'
#' @inherit module_arguments return
#'
Expand Down
12 changes: 7 additions & 5 deletions man/template_shift_by_arm.Rd

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

4 changes: 2 additions & 2 deletions man/template_shift_by_arm_by_worst.Rd

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

14 changes: 10 additions & 4 deletions man/tm_t_shift_by_arm.Rd

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