isNatural: Natural Number

View source: R/is.R

isNaturalR 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) ?

numbers documentation built on Nov. 23, 2022, 9:06 a.m.