Skip to content

Commit

Permalink
docs: documentation simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Dec 5, 2024
1 parent b8c3c71 commit cbb58b7
Show file tree
Hide file tree
Showing 61 changed files with 269 additions and 226 deletions.
8 changes: 8 additions & 0 deletions R/argument_convention.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ NULL
#' value indicating worst grade.
#' @param worst_flag_var ([teal.transform::choices_selected()])\cr object
#' with all available choices and preselected option for variable names that can be used as worst flag variable.
#' @param decorators `r lifecycle::badge("experimental")`
#' " (`list` of `teal_transform_module`, named `list` of `teal_transform_module` or" `NULL`) optional,
#' if not `NULL`, decorator for tables or plots included in the module.
#' When a named list of `teal_transform_module`, the decorators are applied to the respective output objects.
#'
#' Otherwise, the decorators are applied to all objects, which is equivalent as using the name `default`.
#'
#' See section "Decorating Module" below for more details.
#'
#' @return a `teal_module` object.
#'
Expand Down
15 changes: 0 additions & 15 deletions R/roxygen2_templates.R

This file was deleted.

3 changes: 1 addition & 2 deletions R/tm_a_gee.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,10 @@ template_a_gee <- function(output_table,
#' @inheritParams module_arguments
#' @inheritParams template_arguments
#' @inheritParams template_a_gee
#' @param decorators `r roxygen_decorators_param("tm_a_gee")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_a_gee`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`ElementaryTable` - output of `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
#' @param x_facet (`data_extract_spec`)\cr row-wise faceting groups.
#' @param y_facet (`data_extract_spec`)\cr column-wise faceting groups.
#' @param plot_options (`list`)\cr list of plot options.
#' @param decorators `r roxygen_decorators_param("tm_g_barchart_simple")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_barchart_simple`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,10 @@ template_g_ci <- function(dataname,
#' @inheritParams module_arguments
#' @inheritParams template_g_ci
#' @param color (`data_extract_spec`)\cr the group variable used to determine the plot colors, shapes, and line types.
#' @param decorators `r roxygen_decorators_param("tm_g_ci")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_ci`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_forest_rsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,10 @@ template_forest_rsp <- function(dataname = "ANL",
#' @inheritParams tern::g_forest
#' @inheritParams module_arguments
#' @inheritParams template_forest_rsp
#' @param decorators `r roxygen_decorators_param("tm_g_forest_rsp")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_forest_tte`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`gg`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_forest_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,10 @@ template_forest_tte <- function(dataname = "ANL",
#' @inheritParams tern::g_forest
#' @inheritParams module_arguments
#' @inheritParams template_forest_tte
#' @param decorators `r roxygen_decorators_param("tm_g_forest_tte")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_forest_tte`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_ipp.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,10 @@ template_g_ipp <- function(dataname = "ANL",
#' @inheritParams template_g_ipp
#' @param arm_var ([teal.transform::choices_selected()])\cr object with
#' all available choices and preselected option for variable values that can be used as arm variable.
#' @param decorators `r roxygen_decorators_param("tm_g_ipp")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_ipp`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_km.R
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,10 @@ template_g_km <- function(dataname = "ANL",
#' @inheritParams template_g_km
#' @param facet_var ([teal.transform::choices_selected()])\cr object with
#' all available choices and preselected option for names of variable that can be used for plot faceting.
#' @param decorators `r roxygen_decorators_param("tm_g_km")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_km`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,10 @@ template_g_lineplot <- function(dataname = "ANL",
#'
#' @inheritParams module_arguments
#' @inheritParams template_g_lineplot
#' @param decorators `r roxygen_decorators_param("tm_g_lineplot")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_g_lineplot`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
18 changes: 9 additions & 9 deletions R/tm_g_pp_patient_timeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
#'
#' @inherit template_arguments return
#'
#' @section Decorating `tm_g_pp_patient_timeline`:
#'
#' This module generates the following objects, which can be modified in place using decorators::
#' - `plot` (`ggplot2`)
#'
#' For additional details and examples of decorators, refer to the vignette
#' `vignette("decorate-modules-output", package = "teal")` or the [`teal_transform_module()`] documentation.
#'
#' @seealso [tm_g_pp_patient_timeline()]
#'
#' @keywords internal
Expand Down Expand Up @@ -352,10 +344,18 @@ template_patient_timeline <- function(dataname = "ANL",
#' all available choices and preselected option for the `CMASTDTM` variable from `dataname_adcm`.
#' @param dstime_end ([teal.transform::choices_selected()])\cr object with all
#' available choices and preselected option for the `CMAENDTM` variable from `dataname_adcm`.
#' @param decorators `r roxygen_decorators_param("tm_")`
#'
#' @inherit module_arguments return
#'
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
#'
#' For additional details and examples of decorators, refer to the vignette
#' `vignette("decorate-modules-output", package = "teal")` or the [`teal_transform_module()`] documentation.
#'
#'
#' @examplesShinylive
#' library(teal.modules.clinical)
#' interactive <- function() TRUE
Expand Down
3 changes: 1 addition & 2 deletions R/tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,10 @@ template_therapy <- function(dataname = "ANL",
#' available choices and preselected option for the `CMDOSFRQ` variable from `dataname`.
#' @param cmendy ([teal.transform::choices_selected()])\cr object with all
#' available choices and preselected option for the `CMENDY` variable from `dataname`.
#' @param decorators `r roxygen_decorators_param("tm_g_pp_therapy")`
#'
#' @inherit module_arguments return
#'
#' @section Decorating `tm_g_pp_therapy`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators::
#' - `plot` (`ggplot2`)
Expand Down
4 changes: 1 addition & 3 deletions R/tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,10 @@ template_vitals <- function(dataname = "ANL",
#' @inheritParams template_vitals
#' @param xaxis ([teal.transform::choices_selected()])\cr object with all
#' available choices and preselected option for the time variable from `dataname` to be put on the plot x-axis.
#' @param decorators `r roxygen_decorators_param("tm_g_pp_vitals")`
#'
#' @inherit module_arguments return
#'
#'
#' @section Decorating `tm_g_pp_vitals`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `plot` (`ggplot2`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_abnormality.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,10 @@ template_abnormality <- function(parentname,
#' @param baseline_var ([teal.transform::choices_selected()])\cr
#' variable for baseline abnormality grade.
#' @param na_level (`character`)\cr the NA level in the input dataset, default to `"<Missing>"`.
#' @param decorators `r roxygen_decorators_param("tm_t_abnormality")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_t_abnormality`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`ElementaryTable` - output of `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_abnormality_by_worst_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,10 @@ template_abnormality_by_worst_grade <- function(parentname, # nolint: object_len
#' object with all available choices and preselected option for variable names that can be used as Worst Low Grade flag.
#' @param worst_flag_indicator ([teal.transform::choices_selected()])\cr
#' value indicating worst grade.
#' @param decorators `r roxygen_decorators_param("tm_t_abnormality_by_worst_grade")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_t_abnormality_by_worst_grade`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`ElementaryTable` - output of `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,10 @@ template_ancova <- function(dataname = "ANL",
#'
#' @inheritParams module_arguments
#' @inheritParams template_ancova
#' @param decorators `r roxygen_decorators_param("tm_t_ancova")`
#'
#' @inherit module_arguments return
#'
#' @section Decorating `tm_t_ancova`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`ElementaryTable` - output of `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_binary_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,10 @@ template_binary_outcome <- function(dataname,
#' `"Not Evaluable (NE)"`, or `"Missing or unevaluable"`, 95% confidence interval will not be calculated.
#'
#' * Reference arms are automatically combined if multiple arms selected as reference group.
#' @param decorators `r roxygen_decorators_param("tm_t_binary_outcome")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_t_binary_outcome`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` - output of `rtables::build_table`)
Expand Down
6 changes: 3 additions & 3 deletions R/tm_t_coxreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ template_coxreg_m <- function(dataname,
#' @inheritParams template_coxreg_m
#' @param multivariate (`logical`)\cr if `FALSE`, the univariable approach is used instead of the
#' multi-variable model.
#' @param decorators `r roxygen_decorators_param("tm_t_coxreg")`
#'
#' @details
#' The Cox Proportional Hazards (PH) model is the most commonly used method to
Expand All @@ -361,7 +360,7 @@ template_coxreg_m <- function(dataname,
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_t_coxreg`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` as created from `rtables::build_table`)
Expand Down Expand Up @@ -1102,7 +1101,8 @@ srv_t_coxreg <- function(id,

# Outputs to render.
table_r <- reactive({
decorated_table_q()[["table"]]})
decorated_table_q()[["table"]]
})

teal.widgets::table_with_settings_srv(
id = "table",
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,10 @@ template_events <- function(dataname,
#' 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 decorators `r roxygen_decorators_param("tm_t_events")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_t_events`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` as created from `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_events_patyear.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,10 @@ template_events_patyear <- function(dataname,
#' second variable will be nested under the first variable.
#' @param events_var ([teal.transform::choices_selected()])\cr object with
#' all available choices and preselected option for the variable with all event counts.
#' @param decorators `r roxygen_decorators_param("tm_t_events_patyear")`
#'
#' @inherit module_arguments return seealso
#'
#' @section Decorating `tm_t_events_patyear`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` as created from `rtables::build_table`)
Expand Down
5 changes: 1 addition & 4 deletions R/tm_t_events_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,7 @@ template_events_summary <- function(anl_name,
#'
#' @inherit module_arguments return seealso
#'
#' @param decorators `r roxygen_decorators_param("tm_t_events_summary")`
#'
#'
#' @section Decorating `tm_t_events_summary`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` as created from `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_mult_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,10 @@ template_mult_events <- function(dataname,
#' @param seq_var ([teal.transform::choices_selected()])\cr object with
#' all available choices and preselected option for variable names that can be used as analysis sequence number
#' variable. Used for counting the unique number of events.
#' @param decorators `r roxygen_decorators_param("tm_t_mult_events")`
#'
#' @inherit module_arguments return seealso
#'
#' #' @section Decorating `tm_t_mult_events`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` - output of `rtables::build_table`)
Expand Down
3 changes: 1 addition & 2 deletions R/tm_t_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,8 @@ template_tte <- function(dataname = "ANL",
#' pre-selected option for confidence level, each within range of (0, 1).
#' @param event_desc_var (`character` or [data_extract_spec()])\cr variable name with the event description
#' information, optional.
#' @param decorators `r roxygen_decorators_param("tm_t_tte")`
#'
#' @section Decorating `tm_t_tte`:
#' @section Decorating Module:
#'
#' This module generates the following objects, which can be modified in place using decorators:
#' - `table` (`TableTree` - output of `rtables::build_table`)
Expand Down
9 changes: 9 additions & 0 deletions man/module_arguments.Rd

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

12 changes: 0 additions & 12 deletions man/template_patient_timeline.Rd

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

Loading

0 comments on commit cbb58b7

Please sign in to comment.