[Rd] Querying from R if '--quiet' had been set
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Fri Jun 27 16:22:36 CEST 2025
The interactive() predicate is helpful in scripted environments. I sometimes
also invoke R with '--quiet' and am unable to suppress messages from my own
startup code as I cannot test if this flag was set or not. (I can work around
it by setting an additional environment variable, but that is clunky.) For me
'--quiet' is independent to 'interactive'.
R carries the state internally in the integer variable R_Quiet, so a minimal
patch only needs to expose an accessor 'quiet()' model after 'interactive()'.
Then we get the desired behaviour:
~/svn/r-devel$ RD -q
> quiet()
[1] TRUE
>
and this is similarly FALSE in a normal startup without '-q'.
Would this change be of interest? The patch is just a few lines (but does
not yet contain Rd file changes).
Cheers, Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-devel
mailing list