test_sensible_int: Is 'x' an "int" with a sensible class? TRUE/FALSE

View source: R/utils.R

test_sensible_intR Documentation

Is x an "int" with a sensible class? TRUE/FALSE

Description

Like checkmate::test_int but disallowing some non-sensible classes that test_int accepts, such as difftimes. We rely on is.numeric to determine class appropriateness; note that is.numeric is NOT simply checking for the class to be "numeric" (or else we'd fail on integer class).

Usage

test_sensible_int(
  x,
  na.ok = FALSE,
  lower = -Inf,
  upper = Inf,
  tol = sqrt(.Machine$double.eps),
  null.ok = FALSE
)

Arguments

x

object

Value

Boolean


cmu-delphi/epiprocess documentation built on Oct. 29, 2024, 5:37 p.m.