assert_that {pkgcond} | R Documentation |
Scoped Assertions
Description
The pkgcond package intentionally overrides the assertthat::assert_that()
function. It provides the same utility but enhances the original version
by throwing scoped and typed errors. The type is 'assertion failure' and
the scope can be set or inferred from the calling frame.
Usage
assert_that(
...,
env = parent.frame(),
msg = NULL,
scope = find_scope(env),
type = "assertion failure"
)
Arguments
... |
unnamed expressions that describe the conditions to be tested.
Rather than combining expressions with |
env |
(advanced use only) the environment in which to evaluate the assertions. |
msg |
a custom error message to be printed if one of the conditions is false. |
scope |
The scope of the error. |
type |
The error type. |
[Package pkgcond version 0.1.1 Index]