testNumericDiff {MBASED}R Documentation

Function that checks to see if the difference between 2 number is small enough.

Description

Function that checks to see if the difference between 2 number is small enough.

Usage

testNumericDiff(queryVals, targetVals, cutoffFraction)

Arguments

queryVals,targetVals

vectors of values to be compared (pairwise comparison will be performed)

cutoffFraction

the value of cutoff to be used to declare if the two numbers are close enough.

Details

for 2 numbers a and b, the function checks to see if |a-b|/min(a,b) <= cutoff.

Value

vector of same length as input vectors queryVals and targetVals, recording for each pair of numbers whether they pas the cutoff (TRUE) or not (FALSE).

See Also

Other unitTestsFunctions: testQuantiles


[Package MBASED version 1.27.0 Index]