is_wholenumber: Test whether x is a whole number

Description Usage Arguments Value Examples

View source: R/predicates.R

Description

Usage

1
2
3
is_wholenumber(x, tol = .Machine$double.eps^0.5)

is_scalar_wholenumber(x, check_numeric = TRUE, ...)

Arguments

x

Object to be tested

tol

Tolerance

check_numeric

Whether to check whether x is a numeric

...

Arguments to pass to is_wholenumber()

Value

Logical

Examples

1
2
3
4
5
is_wholenumber(1) # TRUE
is_wholenumber(1.0) # TRUE
is_wholenumber(1.1) # FALSE
is_scalar_wholenumber(1) # TRUE
is_scalar_wholenumber(c(1, 2)) # FALSE

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.