checkRange | 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
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: |
range. |
a two-element numeric vector containing the limits of the test interval.
Default: |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.