is.whole {schoolmath} | R Documentation |
This function checks, wether a vector contains whole numbers without decimal places. It returns TRUE or FALSE
is.whole(x)
x |
a number or vector to be checked |
Joerg Schlarmann
is.whole(3.12) # this will return FALSE is.whole(2) # this will return TRUE x <- c(1, 2, 3, 4, 5.5, 6.03, 23.07) is.whole(x)