petermeissner petermeissner - 2 months ago 8
R Question

How to return a error message in R?


Possible Duplicate:

Equivalent of “throw” in R




I was wondering how one is able to produce error messages in R, especially from within a function?

Answer

Since you don't specify what you really want, all I just can say is take a look at

?message # prints a message but not stop execution
?warning # prints a warning message but not stop execution
?stop # stops execution of the current expression and executes an error action.