ensureRangeOpen: ensureRangeOpen

View source: R/ensureRangeOpen.R

ensureRangeOpenR Documentation

ensureRangeOpen

Description

Ensure that value belongs to the open interval ]a,b[

Usage

ensureRangeOpen(x, a, b)

Arguments

x

value

a

lower limit

b

upper limit

Value

corrected value

Examples

# return 1:
ensureRangeOpen(x = 10, a = 0, b = 1)
# return 0:
ensureRangeOpen(x = 0, a = 0, b = 1)
# return 0.5:
ensureRangeOpen(x = 0.5, a = 0, b = 1)

babsim.hospital documentation built on May 30, 2022, 9:05 a.m.