isNatural {numbers}R Documentation

Natural Number

Description

Natural number type.

Usage

  isNatural(n)

Arguments

n

any numeric number.

Details

Returns TRUE for natural (or: whole) numbers between 1 and 2^53-1.

Value

Boolean

Examples

IsNatural <- Vectorize(isNatural)
IsNatural(c(-1, 0, 1, 5.1, 10, 2^53-1, 2^53, Inf))  # isNatural(NA) ?

[Package numbers version 0.8-5 Index]