Learn R Programming

beautier (version 2.6.12)

is_one_int: Determines if the argument is a whole number

Description

Determines if the argument is a whole number

Usage

is_one_int(x, tolerance = .Machine$double.eps^0.5)

Value

TRUE if the argument is one int, FALSE otherwise

Arguments

x

the object to be determined of if it is one integer

tolerance

tolerance to rounding errors

Author

Richèl J.C. Bilderbeek

Examples

Run this code
check_empty_beautier_folder()

# TRUE
is_one_int(314)
is_one_int(0)
is_one_int(-314)
# FALSE
is_one_int(3.14)
is_one_int(NULL)
is_one_int(NA)
is_one_int(Inf)
is_one_int("nonsense")
is_one_int(c())
is_one_int(c(1, 2))

check_empty_beautier_folder()

Run the code above in your browser using DataLab