Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Nov 5, 2024
1 parent 1241ac4 commit 513686c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion R/summarize_change.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ a_change_from_baseline <- function(df,
.names = names(.labels),
.labels = .labels,
.indent_mods = .indent_mods
# .format_na_strs = na_str # set above level
)
}

Expand Down
6 changes: 3 additions & 3 deletions R/utils_default_stats_formats_labels.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ get_stats <- function(method_groups = "analyze_vars_numeric", stats_in = NULL, a
}

# Utility function used to separate custom stats (user-defined functions) from defaults
.split_default_from_custom_stats <- function(stats_in) {
.split_std_from_custom_stats <- function(stats_in) {
out <- list(default_stats = NULL, custom_stats = NULL)
if (is.list(stats_in)) {
is_custom_fnc <- sapply(stats_in, is.function)
Expand Down Expand Up @@ -572,8 +572,8 @@ summary_formats <- function(type = "numeric", include_pval = FALSE) {
#' @param include_pval (`flag`)\cr same as the `add_pval` argument in [get_stats()].
#'
#' @details
#' `summary_*` quick getter for labels or formats uses `get_stats` and `get_labels_from_stats` or `get_formats_from_stats`
#' respectively to retrieve relevant information.
#' `summary_*` quick getter for labels or formats uses `get_stats` and `get_labels_from_stats` or
#' `get_formats_from_stats` respectively to retrieve relevant information.
#'
#' @return
#' * `summary_labels` returns a named `vector` of default statistic labels for the given data type.
Expand Down
2 changes: 1 addition & 1 deletion R/utils_rtables.R
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ retrieve_extra_afun_params <- function(extra_afun_params) {
#' * `get_additional_analysis_fun_parameters` returns a list of additional parameters.
#'
#' @keywords internal
get_additional_analysis_fun_parameters <- function(add_alt_df = FALSE) {
get_additional_afun_params <- function(add_alt_df = FALSE) {
out_list <- list(
.N_col = integer(),
.N_total = integer(),
Expand Down
4 changes: 2 additions & 2 deletions vignettes/tern_functions_guide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ fix_layout <- basic_table() %>%
split_rows_by("AVISIT")
# na_rm = TRUE
# NA: na_rm = TRUE

Check warning on line 70 in vignettes/tern_functions_guide.Rmd

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=vignettes/tern_functions_guide.Rmd,line=70,col=3,[commented_code_linter] Commented code should be removed.
fix_layout %>%
summarize_change("CHG", variables = list(value = "AVAL", baseline_flag = "ABLFLL")) %>%
build_table(dta_test) %>%
print()
# na_rm = FALSE
# NA: na_rm = FALSE

Check warning on line 76 in vignettes/tern_functions_guide.Rmd

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=vignettes/tern_functions_guide.Rmd,line=76,col=3,[commented_code_linter] Commented code should be removed.
fix_layout %>%
summarize_change("CHG", variables = list(value = "AVAL", baseline_flag = "ABLFLL"), na_rm = FALSE) %>%
build_table(dta_test) %>%
Expand Down

0 comments on commit 513686c

Please sign in to comment.