Jil*_*ina 86
既然你没有说明你真正想要的东西,我只能说一下
?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.
Run Code Online (Sandbox Code Playgroud)
只需stop()在函数/脚本中包含
如果您要显示错误消息,请stop()像这样将其包含在内
stop("This is an error message")
Run Code Online (Sandbox Code Playgroud)