Description Usage Arguments Details Value Author(s) See Also Examples
checkTrue that current is within interval of +-magnitude around target
1 2 | checkMagnitude(target, current, orderOfMagnitudes = 1/2,
...)
|
target |
numeric vector |
current |
numeric vector (recyled) of the same length as target |
orderOfMagnitudes |
see details |
... |
further arguments passed to checkTrue |
in range 10^{ log10(current)+-orderOfMagnitudes }
TRUE or error
Thomas Wutzler
1 2 3 4 5 6 7 8 9 10 11 12 | if( requireNamespace("RUnit") ){
target=1e4
checkMagnitude(1e4, 3e4) #TRUE
try(checkMagnitude(1e4, 6e4)) #error
checkMagnitude(1e4, 5000) #TRUE
try(checkMagnitude(1e4, 2000)) #error
checkMagnitude(1e-4, 3e-4) #TRUE
try(checkMagnitude(1e-4, 6e-4)) #error
checkMagnitude(1e-4, 5e-5) #TRUE
try(checkMagnitude(1e-4, 2e-5)) #error
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.