Check Numeric Values

assert_numeric(x, expected, ...)

assert_trend(x, expected, ...)

assert_relation(x, y, expected, ...)

Arguments

x, y

A numeric object to be checked.

expected

A character string specifying the expected value (see details).

...

Extra parameters to be passed to internal methods.

Value

Throws an error, if any, and returns x invisibly otherwise.

Details

Possible values for expected:

assert_numeric()

"positive", "whole", "odd" or "even"

assert_trend()

"constant", "decreasing" or "increasing"

assert_relation()

"lower" or "greater"

See also

Author

N. Frerebeau