Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

muststop

Test for an expression that should result in an error


Description

This function tests the assertion that there is an error in the expression and therefore that evaluating it will generate an error condition.

Usage

muststop(expr, silent = TRUE)

Arguments

expr

Any R expression

silent

if FALSE, the error message will be reported.

Value

If an error is generated, the function returns the corresponding condition object; if not, then muststop() will itself generate an error.

See Also

Examples

muststop(sqrt("abc"))

SoDA

Functions and Examples for "Software for Data Analysis"

v1.0-6.1
GPL (>= 2)
Authors
John M Chambers
Initial release
2014-06-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.