Skip to content

Commit

Permalink
docs: remove custom decorators parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Jan 6, 2025
1 parent b8c4674 commit e13dc89
Show file tree
Hide file tree
Showing 32 changed files with 172 additions and 53 deletions.
14 changes: 0 additions & 14 deletions R/roxygen2_templates.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
# nocov start
roxygen_decorators_param <- function(module_name) {
paste(
sep = " ",
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.\n\n",
"Otherwise, the decorators are applied to all objects, which is equivalent as using the name `default`.\n\n",
sprintf("See section \"Decorating `%s`\"", module_name),
"below for more details."
)
}

roxygen_ggplot2_args_param <- function(...) {
paste(
sep = " ",
Expand Down
1 change: 0 additions & 1 deletion R/tm_a_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#' - If vector of `length == 1` then the font sizes will have a fixed size.
#' - while vector of `value`, `min`, and `max` allows dynamic adjustment.
#' @param ggplot2_args `r roxygen_ggplot2_args_param("Elbow plot", "Circle plot", "Biplot", "Eigenvector plot")`
#' @param decorators `r roxygen_decorators_param("tm_a_pca")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_a_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
# nolint start: line_length.
#' @param ggplot2_args `r roxygen_ggplot2_args_param("Response vs Regressor", "Residuals vs Fitted", "Scale-Location", "Cook's distance", "Residuals vs Leverage", "Cook's dist vs Leverage")`
# nolint end: line_length.
#' @param decorators `r roxygen_decorators_param("tm_a_regression")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_data_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#' `list(searching = FALSE, pageLength = 30, lengthMenu = c(5, 15, 30, 100), scrollX = TRUE)`
#' @param server_rendering (`logical`) should the data table be rendered server side
#' (see `server` argument of [DT::renderDataTable()])
#' @param decorators `r roxygen_decorators_param("tm_data_table")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_association.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' Default to `"gray"`.
#'
#' @param ggplot2_args `r roxygen_ggplot2_args_param("Bivariate1", "Bivariate2")`
#' @param decorators `r roxygen_decorators_param("tm_g_association")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_bivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#' @param free_y_scales (`logical`) optional, whether Y scaling shall be changeable.
#' Does not allow scaling to be changed by default (`FALSE`).
#' @param swap_axes (`logical`) optional, whether to swap X and Y axes. Defaults to `FALSE`.
#' @param decorators `r roxygen_decorators_param("tm_g_bivariate")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#' Defaults to `c(30L, 1L, 100L)`.
#'
#' @param ggplot2_args `r roxygen_ggplot2_args_param("Histogram", "QQplot")`
#' @param decorators `r roxygen_decorators_param("tm_g_distribution")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#' @param freq (`logical(1)`)
#' Indicates whether to display frequency (`TRUE`) or density (`FALSE`).
#' Defaults to density (`FALSE`).
#' @param decorators `r roxygen_decorators_param("tm_g_response")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#' `vignette("ggplot2-specs", package="ggplot2")`.
#' @param max_deg (`integer`) optional, maximum degree for the polynomial trend line. Must not be less than 1.
#' @param table_dec (`integer`) optional, number of decimal places used to round numeric values in the table.
#' @param decorators `r roxygen_decorators_param("tm_g_scatterplot")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_scatterplotmatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#' Specifies plotting variables from an incoming dataset with filtering and selecting. In case of
#' `data_extract_spec` use `select_spec(..., ordered = TRUE)` if plot elements should be
#' rendered according to selection order.
#' @param decorators `r roxygen_decorators_param("tm_g_scatterplotmatrix")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_missing_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#' @param ggtheme (`character`) optional, specifies the default `ggplot2` theme for plots. Defaults to `classic`.
#' @param ggplot2_args `r roxygen_ggplot2_args_param("Summary Obs", "Summary Patients", "Combinations Main", "Combinations Hist", "By Subject")`
# nolint end: line_length.
#' @param decorators `r roxygen_decorators_param("tm_missing_data")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#' @param categorical_var (`data_extract_spec` or `list` of multiple `data_extract_spec`) optional,
#' specifies the categorical variable(s) to split the selected outlier variables on.
#' @param ggplot2_args `r roxygen_ggplot2_args_param("Boxplot", "Density Plot", "Cumulative Distribution Plot")`
#' @param decorators `r roxygen_decorators_param("tm_outliers")`
#'
#' @inherit shared_params return
#'
Expand Down
1 change: 0 additions & 1 deletion R/tm_t_crosstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#' @param show_total (`logical(1)`)
#' Indicates whether to show total column.
#' Defaults to `TRUE`.
#' @param decorators `r roxygen_decorators_param("tm_t_crosstable")`
#'
#' @note For more examples, please see the vignette "Using cross table" via
#' `vignette("using-cross-table", package = "teal.modules.general")`.
Expand Down
8 changes: 8 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
#' - When the length of `size` is one: the plot point sizes will have a fixed size.
#' - When the length of `size` is three: the plot points size are dynamically adjusted based on
#' vector of `value`, `min`, and `max`.
#' @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 Object of class `teal_module` to be used in `teal` applications.
#'
Expand Down
21 changes: 21 additions & 0 deletions man/figures/lifecycle-deprecated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-experimental.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions man/figures/lifecycle-stable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions man/figures/lifecycle-superseded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/normalize_decorators.Rd

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

9 changes: 9 additions & 0 deletions man/shared_params.Rd

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

7 changes: 5 additions & 2 deletions man/tm_a_pca.Rd

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

7 changes: 5 additions & 2 deletions man/tm_a_regression.Rd

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

7 changes: 5 additions & 2 deletions man/tm_data_table.Rd

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

7 changes: 5 additions & 2 deletions man/tm_g_association.Rd

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

Loading

0 comments on commit e13dc89

Please sign in to comment.