From fdf62717f983da602bfa4b44b0effbf64c853d9b Mon Sep 17 00:00:00 2001 From: sda030 Date: Sat, 24 Aug 2024 17:54:59 +0200 Subject: [PATCH] Fixes error on NA by NA Closes #108 --- R/summarize_cat_cat_data.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/summarize_cat_cat_data.R b/R/summarize_cat_cat_data.R index aeca463..96c278c 100644 --- a/R/summarize_cat_cat_data.R +++ b/R/summarize_cat_cat_data.R @@ -3,9 +3,11 @@ # Helper function to create overarching factor variable for the response categories column category_var_as_fct <- function(data_summary, fct_unions) { + data_summary$.category <- factor(x = data_summary$.category, levels = fct_unions, - labels = fct_unions) + labels = fct_unions, + exclude = NULL) data_summary }