is.naturalnumber: Is a positive integer?

View source: R/common.R

is.naturalnumberR Documentation

Is a positive integer?

Description

is.naturalnumber returns true if the passed argument is a positive integer, false otherwise. Implementation taken from Marcog's answer to this question

Usage

is.naturalnumber(x, low.Limit = 0)

Arguments

x

the value(s) to be tested

low.Limit

the greatest value not accepted. Defaults to zero, meaning that one is the smallest integer that returns true.

Value

TRUE if the value is a positive integer, FALSE otherwise (or NA)


GROAN documentation built on Nov. 28, 2022, 5:07 p.m.