| checkRange {ifultools} | R Documentation |
Tests the input range based on the specified interval.
checkRange(x, range.=0:1, inclusion=c(TRUE,TRUE))
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
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. |
no output is returned. If these tests fail, a stop condition
is executed.
isVectorAtomic, checkVectorType, checkScalarType.
## expect no output from the following calls checkRange(pi,range=c(0,5)) checkRange(1:5,range=c(1,5), inclusion=c(TRUE,TRUE))