abort_chk | R Documentation |
A wrapper on err()
that sets the subclass to be 'chk_error'
.
abort_chk(..., n = NULL, tidy = TRUE, call = rlang::caller_call(2))
... |
Multiple objects that are converted to a string using
|
n |
The value of n for converting |
tidy |
A flag specifying whether capitalize the first character and add a missing period. |
call |
The execution environment of a currently running
function, e.g. You only need to supply Can also be For more information about error calls, see Including function calls in error messages. |
It is exported to allow users to easily construct their own chk_
functions.
Throws an error of class 'chk_error'
.
err()
try(abort_chk("x must be NULL"))
try(abort_chk("`x` must be NULL"))
try(abort_chk("there %r %n problem value%s", n = 1))
try(abort_chk("there %r %n problem value%s", n = 1.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.