Does R have an assert statement as in python?

Dan picture Dan · Feb 10, 2010 · Viewed 25.2k times · Source

a statement that checks if something is true and if not prints a given error message and exits

Answer

Harlan picture Harlan · Feb 10, 2010

stopifnot()

You may also be interested in packages like Runit and testthat for unit testing.