rassertlanguage-designassertions

Does R have an assert statement as in python?


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


Solution

  • stopifnot()

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