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 | e...@debian.org

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to