From ed9369985daf057983d2a8446fcbeca7753cd95b Mon Sep 17 00:00:00 2001 From: Konrad Pagacz Date: Fri, 22 Nov 2024 12:48:52 +0100 Subject: [PATCH] fix: fixed an issue of a solitary NA as var_labels passed to analyze --- R/colby_constructors.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/colby_constructors.R b/R/colby_constructors.R index d23d243a1..b56c0d948 100644 --- a/R/colby_constructors.R +++ b/R/colby_constructors.R @@ -1113,6 +1113,7 @@ analyze <- function(lyt, section_div = NA_character_) { show_labels <- match.arg(show_labels) subafun <- substitute(afun) + var_labels <- vapply(var_labels, function(label) ifelse(is.na(label), NA_character_, label), character(1)) if ( is.name(subafun) && is.function(afun) &&