is.int: Determins if a number is an IEEE-754 integer

View source: R/check_funcs.R

is.intR Documentation

Determins if a number is an IEEE-754 integer

Description

Determines if a vector fits the IEEE-754 definition of an integer that can be exactly represented with a double-precision number.

Usage

is.int(x, ...)

Arguments

x

the vector to check

...

provides backward compatibility with previous versions.

Value

Returns TRUE for each element of x that is an IEEE-754-compliant integer, and FALSE for all other elements.

Source

http://www.win-vector.com/blog/2015/06/r-in-a-64-bit-world/

Examples

 x <- c(1, 412, 4.4, 0.003)
 is.int(x)

tomhopper/numbr documentation built on Nov. 5, 2022, 11:35 p.m.