powered by
Vectorized function for checking if numbers are natural or not. Helps in checking if a vector is of type "order".
is.natural.number(x, tol = .Machine$double.eps^0.5, ...)
a vector of numbers
tolerence to floating point issues.
(not currently in use)
logical - is the entered number natural or not.
is.numeric, is.double, is.integer
is.numeric
is.double
is.integer
# NOT RUN { is.natural.number(1) # is TRUE (x <- seq(-1, 5, by = 0.5)) is.natural.number(x) # is.natural.number( "a" ) all(is.natural.number(x)) # }
Run the code above in your browser using DataLab