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

dont_stop

Run code without stopping


Description

Runs code without stopping for warnings or errors.

Usage

dont_stop(expr)

Arguments

expr

Code to execute.

Value

A list containing the results of evaluating each call in expr.

Note

This function is dangerous, since it overrides warnings and errors. Its intended use is for documenting examples of warnings and errors.

See Also

warning and stop for generating warnings and errors respectively; try and conditions for handling them.

Examples

dont_stop({
  warning("a warning")
  x <- 1
  stop("an error")
  y <- sqrt(exp(x + 1))
  assert_is_identical_to_true(y)
  y > 0
})

assertive.base

A Lightweight Core of the 'assertive' Package

v0.0-9
GPL (>= 3)
Authors
Richard Cotton [aut, cre], Sunkyu Choi [trl], Ivanka Skakun [trl], Gergely Dar<c3><b3>czi [trl], Anton Antonov [trl], Hisham Ben Hamidane [trl], Anja Billing [trl], Aditya Bhagwat [trl], Rasmus B<c3><a5><c3><a5>th [trl], Mine Cetinkaya-Rundel [trl], Aspasia Chatziefthymiou [trl]
Initial release
2021-02-07

We don't support your browser anymore

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