
Last chance! 50% off unlimited learning
Sale ends in
Natural number type.
isNatural(n)
any numeric number.
Boolean
Returns TRUE
for natural (or: whole) numbers between 1 and 2^53-1.
# NOT RUN {
IsNatural <- Vectorize(isNatural)
IsNatural(c(-1, 0, 1, 5.1, 10, 2^53-1, 2^53, Inf, NA))
# }
Run the code above in your browser using DataLab