使R以非零状态码退出

我正在寻找Linux / POSIX exit(n)的R等价物,它将以退出代码n停止进程,向父进程发送信号,指出发生了错误。 R有这样的设施吗?

这是quit()的一个参数。 见?quit

参数

 status: the (numerical) error status to be returned to the operating system, where relevant. Conventionally '0' indicates successful completion. 

详情

  Some error statuses are used by R itself. The default error handler for non-interactive use effectively calls 'q("no", 1, FALSE)' and returns error code 1. Error status 2 is used for R 'suicide', that is a catastrophic failure, and other small numbers are used by specific ports for initialization failures. It is recommended that users choose statuses of 10 or more.