Returns TRUE when values are non-negative integers with more than two distinct observed values.
TRUE
is_count(x)
x
A single logical value.
library("rmb") is_count(c(0, 1, 2, 5, NA))
[1] TRUE
is_count(c(0, 1))
[1] FALSE
is_count(c(0.5, 1.5, 2.5))
is_count(c(-1, 0, 1))