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(