withinThreshold: Threshold checker.

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Checks if two values are within a certain one-dimensional distance of each other.

Usage

1
withinThreshold(value1, value2, threshold)

Arguments

value1

The first value, as a number.

value2

The second value, as a number.

threshold

The maximum distance between the values, as a number.

Value

TRUE if the values are within the distance; FALSE otherwise.

Examples

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)

ychen-uoft/msFeatureCmp documentation built on Dec. 23, 2021, 7:17 p.m.