Is natural

Description

Test if is a natural number

Usage

1

Arguments

x

an R object

Details

Zero is not included in the set of natural numbers

See Also

is_negative

Examples

1
2
3
4
5
6
7
is_natural(1)
is_natural(0)
is_natural(seq(-2, 3))
is_natural(iris$Species)

M = matrix(seq(-3, 2), 2, 3)
is_natural(M)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.