Description Usage Arguments Value Examples
Checks if two values are within a certain one-dimensional distance of each other.
1 | withinThreshold(value1, value2, threshold)
|
value1 |
The first value, as a number. |
value2 |
The second value, as a number. |
threshold |
The maximum distance between the values, as a number. |
TRUE if the values are within the distance; FALSE otherwise.
1 2 3 4 5 6 7 | ## Not run:
x1 <- 5.1
x2 <- 5.05
maxDist <- 0.01
withinThreshold(x1, x2, maxDist) # Returns FALSE
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.