powered by
Natural number type.
isNatural(n)
Boolean
any numeric number.
Returns TRUE for natural (or: whole) numbers between 1 and 2^53-1.
TRUE
IsNatural <- Vectorize(isNatural) IsNatural(c(-1, 0, 1, 5.1, 10, 2^53-1, 2^53, Inf)) # isNatural(NA) ?
Run the code above in your browser using DataLab