a statement that checks if something is true and if not prints a given error message and exits
thank you much!
Dan
2010-02-10 01:10:49
Is there a way to control the error message that is reported if stopifnot() stops?
Nick
2010-03-12 20:28:42
@Nick, no. Use `stopifnot()` for validity testing, to test that code is doing what it's supposed to be doing, but `if (blahdiblah) stop("error message")` for input testing, to test that the input to the program is valid. Only the latter should ever happen during normal use.
Harlan
2010-03-14 14:27:01