Tests the input range based on the specified interval.
Usage
checkRange(x, range.=0:1, inclusion=c(TRUE,TRUE))
Value
no output is returned. If these tests fail, a stop condition
is executed.
Arguments
x
an object belonging to class numeric.
inclusion
a two-element logical vector defining the boundary tests.
For example, if range.=0:1, the interval boundaries are tested as follows
inclusion=c(TRUE,TRUE)
range(x) must be on [0,1].
inclusion=c(TRUE,FALSE)
range(x) must be on [0,1).
inclusion=c(FALSE,TRUE)
range(x) must be on (0,1].
inclusion=c(FALSE,FALSE)
range(x) must be on (0,1).
If only a single logical element is specified, it is replicated
to form a two-element vector. If more than two elements are specified,
only the first two are used as described above.
Default: c(TRUE,TRUE).
range.
a two-element numeric vector containing the limits of the test interval.
Default: 0:1.