ensureRangeOpen: ensureRangeOpen

Description Usage Arguments Value Examples

View source: R/ensureRangeOpen.R

Description

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

Usage

1
ensureRangeOpen(x, a, b)

Arguments

x

value

a

lower limit

b

upper limit

Value

corrected value

Examples

1
2
3
4
5
6
# 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 Nov. 11, 2021, 1:06 a.m.