Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Aug 29, 2023
1 parent d4e4678 commit d92791e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/remove_empty.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d92791e

Please sign in to comment.