Skip to contents

Check Numeric Values

Usage

assert_count(x, na.rm = FALSE, ...)

assert_whole(x, na.rm = FALSE, ...)

assert_positive(x, na.rm = FALSE, ...)

assert_negative(x, na.rm = FALSE, ...)

assert_odd(x, na.rm = FALSE, ...)

assert_even(x, na.rm = FALSE, ...)

Arguments

x

A numeric object to be checked.

na.rm

A logical scalar: should missing values (including NaN) be omitted?

...

Extra parameters to be passed to internal methods.

Value

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

Author

N. Frerebeau