
Last chance! 50% off unlimited learning
Sale ends in
is_num_fac(x)
factor
.TRUE
if factor has numeric factor levels only,
FALSE
otherwise.# numeric factor levels
f1 <- factor(c(NA, 1, 3, NA, 2, 4))
is_num_fac(f1)
# not completeley numeric factor levels
f2 <- factor(c(NA, "C", 1, 3, "A", NA, 2, 4))
is_num_fac(f2)
# not completeley numeric factor levels
f3 <- factor(c("Justus", "Bob", "Peter"))
is_num_fac(f3)
Run the code above in your browser using DataLab