sanity.check: sanity.check

Description Usage Arguments Details Value Author(s)

View source: R/methods.R

Description

The function provides an ad-hoc set of tests for input checks and correction.

Usage

1
2
  sanity.check(input, symbol, default.type = NULL,
    default.value = NULL, threshold = NULL)

Arguments

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'.

Details

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.

Value

Depening on the violations found the function returns warnings or corrects the given 'input'.

Author(s)

Peter Kehler


peterkehlerjr/RcppGO documentation built on Dec. 29, 2021, 11:20 p.m.