Skip to content

Commit

Permalink
chore: fix R CMD check with missing arguments and using rlang that is…
Browse files Browse the repository at this point in the history
… not in dependencies
  • Loading branch information
averissimo committed Dec 4, 2024
1 parent 1ac634c commit a9eb913
Show file tree
Hide file tree
Showing 40 changed files with 113 additions and 92 deletions.
27 changes: 14 additions & 13 deletions R/tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ 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
#'
Expand Down Expand Up @@ -443,19 +444,19 @@ srv_g_vitals <- function(id,
)

observeEvent(patient_data_base(),
handlerExpr = {
teal.widgets::updateOptionalSelectInput(
session,
"patient_id",
choices = patient_data_base(),
selected = if (length(patient_data_base()) == 1) {
patient_data_base()
} else {
intersect(patient_id(), patient_data_base())
}
)
},
ignoreInit = TRUE
handlerExpr = {
teal.widgets::updateOptionalSelectInput(
session,
"patient_id",
choices = patient_data_base(),
selected = if (length(patient_data_base()) == 1) {
patient_data_base()
} else {
intersect(patient_id(), patient_data_base())
}
)
},
ignoreInit = TRUE
)

# Vitals tab ----
Expand Down
1 change: 1 addition & 0 deletions R/tm_t_abnormality_by_worst_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ 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
#'
Expand Down
1 change: 1 addition & 0 deletions R/tm_t_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ template_ancova <- function(dataname = "ANL",
#'
#' @inheritParams module_arguments
#' @inheritParams template_ancova
#' @param decorators `r roxygen_decorators_param("tm_t_ancova")`
#'
#' @inherit module_arguments return
#'
Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ srv_decorate_teal_data <- function(id, data, decorators, expr, expr_is_reactive

missing_expr <- missing(expr)
if (!missing_expr && !expr_is_reactive) {
expr <- rlang::enexpr(expr)
expr <- dplyr::enexpr(expr) # Using dplyr re-export to avoid adding rlang to Imports
}

moduleServer(id, function(input, output, session) {
Expand All @@ -980,9 +980,9 @@ srv_decorate_teal_data <- function(id, data, decorators, expr, expr_is_reactive
if (missing_expr) {
decorated_output()
} else if (expr_is_reactive) {
eval_code(decorated_output(), expr())
teal.code::eval_code(decorated_output(), expr())
} else {
eval_code(decorated_output(), expr)
teal.code::eval_code(decorated_output(), expr)
}
})
})
Expand Down
4 changes: 2 additions & 2 deletions man/tm_a_gee.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/tm_a_mmrm.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/tm_g_barchart_simple.Rd

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

Loading

0 comments on commit a9eb913

Please sign in to comment.