Skip to content
Prev 8077 / 12125 Next

[R-pkg-devel] nit-picking about CRAN repository policy

Is there a status code I could use to signal early-stopping due to
missing dependencies (eg in test scripts)?

I am thinking of writing something like:

    require(suggested_pkg) || quit(status=13)

I checked ?quit which says:

     Some error status values are used by R itself.  The default error
     handler for non-interactive use effectively calls 'q("no", 1,
     FALSE)' and returns error status 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.

Probably there's already an error code for a missing dependency. I
would imagine the list of status codes exists somewhere, but I wasn't
able to find it easily with "man R" / google / SO / rseek.
On Mon, May 9, 2022 at 3:58 PM Sebastian Meyer <seb.meyer at fau.de> wrote: