Skip to content

Commit

Permalink
Small fix to prevent NA
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Mar 1, 2024
1 parent 0d5c634 commit 5846872
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/tabula-internal.R
@@ -1,8 +1,9 @@
# HELPERS

is_incidence <- function(x) {
if (is.logical(x)) return(TRUE)
x <- as.numeric(x)
all(x == 0 | x == 1)
all(x == 0 | x == 1, na.rm = TRUE)
}

#' Colour Ramp
Expand Down

0 comments on commit 5846872

Please sign in to comment.