is.wholenumber: Check if a value is a whole number

View source: R/tostring.R

is.wholenumberR Documentation

Check if a value is a whole number

Description

Check if a value is a whole number

Usage

is.wholenumber(x, tol = .Machine$double.eps^0.5)

Arguments

x

(numeric(1))
a numeric value.

tol

(numeric(1))
a precision tolerance.

Value

TRUE if x is within tol of zero, FALSE otherwise.

Examples

is.wholenumber(5)
is.wholenumber(5.00000000000000001)
is.wholenumber(.5)


formatters documentation built on June 22, 2024, 9:42 a.m.