Description Usage Arguments Details Value Author(s)
The function provides an ad-hoc set of tests for input checks and correction.
1 2 | sanity.check(input, symbol, default.type = NULL,
default.value = NULL, threshold = NULL)
|
input |
The input to be tested. |
symbol |
The mathematical describing the relation between 'input' and 'threshold'. |
default.type |
A default type 'input' is tested against. |
default.value |
A default value, if 'threshold' is violated. |
threshold |
A threshold for 'input'. |
detailsThe tests so far include a type test of the given 'input' against a 'default.type'. If a 'threshold' according to 'symbol' is violated, 'input' is substituted by a 'default.value' and a warning message is issued. In addition a test against +/- Inf values is conducted and a warning message is issued. The function is not checked against all possible value combinations and may produce unforseen errors.
Depening on the violations found the function returns warnings or corrects the given 'input'.
Peter Kehler
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.