Learn R Programming

assertive (version 0.1-7)

assert_all_numbers_are_whole_numbers: Is the input a whole number?

Description

Checks that the (probably floating point) input is a whole number.

Usage

assert_all_numbers_are_whole_numbers(x,
    tol = .Machine$double.eps)

  assert_any_numbers_are_whole_numbers(x,
    tol = .Machine$double.eps)

  is_whole_number(x, tol = 100 * .Machine$double.eps)

Arguments

x
Input to check.
tol
Differences smaller than tol are not considered.

Value

  • TRUE if the input is a whole number.