From 0bbd5ed600fd8cb4da17af069893f0616e0b64f2 Mon Sep 17 00:00:00 2001 From: Dan Chaltiel Date: Wed, 31 Jul 2024 17:12:04 +0200 Subject: [PATCH] bugfix in ae_table_grade() --- R/ae_table_grade.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/ae_table_grade.R b/R/ae_table_grade.R index 71bf309..a2565bf 100644 --- a/R/ae_table_grade.R +++ b/R/ae_table_grade.R @@ -377,10 +377,9 @@ ae_table_grade = function( rex = type %>% paste(collapse="|") %>% paste0("^(", ., ")") - percent_pattern = if(isTRUE(percent)) "{n} ({scales::percent(n/n_col,1)})" + percent_pattern = if(isTRUE(percent)) "{n} ({scales::percent(n/n_col_na,1)})" else if(percent=="only") "{n/n_col}" else "{n}" - rtn = df %>% summarise(