range_test: Test object ranges against expectations

range_funR Documentation

Test object ranges against expectations

Description

Test object ranges against expectations

Usage

range_fun(x, limit, include_limit, include_fun, exclude_fun)

order_limits(lower, upper)

range_examine(
  x,
  lower = 0,
  upper = 1440,
  inc_lower = TRUE,
  inc_upper = FALSE,
  test_limits = TRUE
)

range_test(
  x,
  lower = 0,
  upper = 1439,
  inc_lower = TRUE,
  inc_upper = FALSE,
  rational_adjust = TRUE
)

Arguments

x

object to test

limit

placeholder for lower or upper

include_fun

function for comparing x against limit when the limit is included in the range

exclude_fun

function for comparing x against limit when the limit is excluded from the range

lower

lower limit of expectation

upper

upper limit of expectation

inc_lower

logical. Include lower in the range ([) or not (()?

inc_upper

logical. Include upper in the range (]) or not ())?

test_limits

logical. run order_limits to check that lower is less than upper

rational_adjust

logical. Adjust the range based on a rational attribute in x?


paulhibbing/daytime documentation built on July 13, 2022, 6:32 p.m.