Skip to content

Commit 5846872

Browse files
committed
Small fix to prevent NA
1 parent 0d5c634 commit 5846872

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/tabula-internal.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# HELPERS
22

33
is_incidence <- function(x) {
4+
if (is.logical(x)) return(TRUE)
45
x <- as.numeric(x)
5-
all(x == 0 | x == 1)
6+
all(x == 0 | x == 1, na.rm = TRUE)
67
}
78

89
#' Colour Ramp

0 commit comments

Comments
 (0)