is.wholenumber: Determine whether number is integral or not.

is.wholenumberR Documentation

Determine whether number is integral or not.

Description

Checks whether a numeric value is integral, up to machine or other specified prescision.

Usage

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

Arguments

x

numeric vector to be tested.

tol

The desired precision.

Value

A logical vector of the same length as x, containing the results of the test.

Author(s)

Robin Evans

Examples


x = c(0.5, 1, 2L, 1e-20)
is.wholenumber(x)


rje documentation built on Nov. 12, 2022, 9:06 a.m.