From d92791edc599b91e260a3fdab82ccc16acfa8d35 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 29 Aug 2023 11:27:50 +0200 Subject: [PATCH] fix --- R/remove_empty.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/remove_empty.R b/R/remove_empty.R index 5640e0fbe..c7fd75423 100644 --- a/R/remove_empty.R +++ b/R/remove_empty.R @@ -63,7 +63,7 @@ empty_columns <- function(x) { } else { all_na <- colSums(is.na(x)) == nrow(x) all_empty <- vapply(x, function(i) { - (is.character(i) || is.factor(i)) && !any(nzchar(as.character(i))) + (is.character(i) || is.factor(i)) && !any(nzchar(as.character(i[!is.na(i)]))) }, FUN.VALUE = logical(1L)) which(all_na | all_empty)