From 1dd20193f02d265ec7261d3c081dd9fb8f3f50a0 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:14:11 +0000 Subject: [PATCH] [skip style] [skip vbump] Restyle files --- R/analyze_variables.R | 2 +- tests/testthat/test-analyze_variables.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/analyze_variables.R b/R/analyze_variables.R index c0eb2644de..d6fc459caa 100644 --- a/R/analyze_variables.R +++ b/R/analyze_variables.R @@ -620,7 +620,7 @@ a_summary <- function(x, .indent_mods <- get_indents_from_stats(.stats, .indent_mods) # Check for custom labels from control_analyze_vars - if (is.character(x) || is.factor(x)){ + if (is.character(x) || is.factor(x)) { levels_per_stats <- lapply(x_stats, names) } else { levels_per_stats <- NULL diff --git a/tests/testthat/test-analyze_variables.R b/tests/testthat/test-analyze_variables.R index ee9299e70e..45357dba9a 100644 --- a/tests/testthat/test-analyze_variables.R +++ b/tests/testthat/test-analyze_variables.R @@ -592,7 +592,8 @@ testthat::test_that("analyze_vars works well with additional stat names (.stat_n .stats = c("n", "mean", "count_fraction", "a_zero" = function(x, ...) { return(0) - }), + } + ), .stat_names_in = list("n" = "CoUnT", "v" = "something"), .formats = c("mean" = "auto", "v" = "xx.xx"), .labels = list("n" = "N=", "a" = "AAAA", "a_zero" = "A_ZERO"), @@ -615,4 +616,3 @@ testthat::test_that("analyze_vars works well with additional stat names (.stat_n c("VAR2", "a_zero", "A_ZERO", NA, 0) ) }) -