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

Clean up documentation for tm_t_shift_by_grade #998

Merged
merged 6 commits into from
Jan 31, 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
6 changes: 6 additions & 0 deletions R/argument_convention.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
#' @param var_labels optional, (named `character`)\cr variable labels for relabeling the analysis variables.
#' @param visit_var (`character`)\cr variable names that can be used as `visit` variable. Must be a factor in
#' `dataname`.
#' @param worst_flag_indicator (`character`)\cr value indicating worst grade.
#' @param worst_flag_var (`character`)\cr name of the worst flag variable.
#'
#' @name template_arguments
#' @keywords internal
Expand Down Expand Up @@ -175,6 +177,10 @@ NULL
#' @param useNA (`character`)\cr whether missing data (`NA`) should be displayed as a level.
#' @param visit_var (`choices_selected` or `data_extract_spec`)\cr object with all available choices and preselected
#' option for variable names that can be used as `visit` variable. Must be a factor in `dataname`.
#' @param worst_flag_indicator ([teal.transform::choices_selected()] or [teal.transform::data_extract_spec()])\cr
#' value indicating worst grade.
#' @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.
#'
#' @return `module` object generated by the [teal::module()] function.
#'
Expand Down
29 changes: 12 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,15 @@ 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.
#'
#' @export
#' @examples
#' ADSL <- tmc_ex_adsl
#' ADLB <- tmc_ex_adlb
Expand Down Expand Up @@ -529,6 +523,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 +619,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 +726,7 @@ ui_t_shift_by_grade <- function(id, ...) {
)
}

#' @noRd
#' @keywords internal
srv_t_shift_by_grade <- function(id,
data,
reporter,
Expand Down
6 changes: 6 additions & 0 deletions man/module_arguments.Rd

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

4 changes: 4 additions & 0 deletions man/template_arguments.Rd

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

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.

3 changes: 2 additions & 1 deletion man/tm_t_shift_by_arm_by_worst.Rd

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

13 changes: 6 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.

Loading