powered by
This function tests the assertion that there is an error in the expression and therefore that evaluating it will generate an error condition.
muststop(expr, silent = TRUE)
Any R expression
if FALSE, the error message will be reported.
FALSE
If an error is generated, the function returns the corresponding condition object; if not, then muststop() will itself generate an error.
condition
muststop()
stopifnot
# NOT RUN { muststop(sqrt("abc")) # }
Run the code above in your browser using DataLab