crew_assert | R Documentation |
Assert that a condition is true.
crew_assert(value = NULL, ..., message = NULL, envir = parent.frame())
value |
An object or condition. |
... |
Conditions that use the |
message |
Optional message to print on error. |
envir |
Environment to evaluate the condition. |
NULL
(invisibly). Throws an error if the condition is not true.
Other utility:
crew_clean()
,
crew_deprecate()
,
crew_eval()
,
crew_random_name()
,
crew_retry()
,
crew_terminate_process()
,
crew_terminate_signal()
,
crew_worker()
crew_assert(1 < 2)
crew_assert("object", !anyNA(.), nzchar(.))
tryCatch(
crew_assert(2 < 1),
crew_error = function(condition) message("false")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.