assertive

0th

Percentile

Readable check functions to ensure code integrity.

assertive contains lots of is_* functions to check the state of your variables, and assert_* functions to throw errors if they aren't in the right form.

Details

When the package loads, it creates a global option "assertive.severity" that determines what happens when an assert_* function's input fails the condition. By default, an error is thrown but it is possible to generate warnings or messages instead (see the examples).

Aliases
  • assertive
  • assertive-package
Examples
# NOT RUN {
is_numeric(1:10)
assert_all_are_positive(1:10)
dont_stop(assert_is_scalar(runif(10)))
# }
Documentation reproduced from package assertive, version 0.3-6, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.