[R] The "--slave" option ==> will become "--no-echo"

William Michels wjm1 @end|ng |rom c@@@co|umb|@@edu
Fri Sep 27 23:36:17 CEST 2019


Hi Martin,

'--no-echo'

....or....

'--no_echo'

Obviously you may prefer the first, but I hope you might consider the second.

Best Regards,

W. Michels, Ph.D.


On Fri, Sep 27, 2019 at 9:04 AM Martin Maechler
<maechler using stat.math.ethz.ch> wrote:
>
> >>>>> Martin Maechler
> >>>>>     on Mon, 23 Sep 2019 16:14:36 +0200 writes:
>
> >>>>> Richard O'Keefe
> >>>>>     on Sat, 21 Sep 2019 09:39:18 +1200 writes:
>
>     >> Ah, *now* we're getting somewhere.  There is something
>     >> that *can* be done that's genuinely helpful.
>     >>> From the R(1) manual page:
>     >> -q, --quiet Don't print startup message
>
>     >> --silent Same as --quiet
>
>     >> --slave Make R run as quietly as possible
>
>     >> It might have been better to use --nobanner instead of
>     >> --quiet.  So perhaps
>
>     >> -q, --quiet Don't print the startup message.  This is
>     >> the only output that is suppressed.
>
>     >> --silent Same as --quiet.  Suppress the startup
>     >> message only.
>
>     >> --slave Make R run as quietly as possible.  This is
>     >> for use when running R as a subordinate process.  See
>     >> "Introduction to Sub-Processes in R"
>     >> https://cran.r-project.org/web/packages/subprocess/vignettes/intro.html
>     >> for an example.
>
>     > Thank you, Stephen and Richard.
>
>     > I think we (the R Core Team) *can* make the description a bit
>     > more verbose. However, as practically all "--<foo>" descriptions
>     > are fitting in one short line, (and as the 'subprocess' package is just an
>     > extension pkg, and may disappear (and more reasons)) I'd like to
>     > be less verbose than your proposal.
>
>     > What about
>
>     > -q, --quiet               Don't print startup message
>
>     > --silent          Same as --quiet
>
>     > --slave           Make R run as quietly as possible.  For use when
>     > runnning R as sub(ordinate) process.
>
>     > If you look more closely, you'll notice that --slave is not much
>     > quieter than --quiet, the only (?) difference being that the
>     > input is not copied and (only "mostly") the R prompt is also not printed.
>
>     > And from my experiments (in Linux (Fedora 30)), one might even
>     > notice that in some cases --slave prints the R prompt (to stderr?)
>     > which one might consider bogous (I'm not: not wanting to spend
>     > time fixing this platform-independently) :
>
>     > --slave :
>     > ------------------------
>
>     > MM using lynne$ echo '(i <- 1:3)
>     > i*10' | R-3.6.1 --slave --vanilla
>     >> [1] 1 2 3
>     > [1] 10 20 30
>     > MM using lynne$ f=/tmp/Rslave.out$$; echo '(i <- 1:3)
>     > i*10' | R-3.6.1 --slave --vanilla | tee $f
>     >> [1] 1 2 3
>     > [1] 10 20 30
>     > MM using lynne$ cat $f
>     > [1] 1 2 3
>     > [1] 10 20 30
>
>     > --quiet :
>     > ------------------------
>
>     > MM using lynne$ f=/tmp/Rquiet.out$$; echo '(i <- 1:3)
>     > i*10' | R-3.6.1 --quiet --vanilla | tee $f
>     >> (i <- 1:3)
>     > [1] 1 2 3
>     >> i*10
>     > [1] 10 20 30
>     >>
>     > MM using lynne$ cat $f
>     >> (i <- 1:3)
>     > [1] 1 2 3
>     >> i*10
>     > [1] 10 20 30
>     >>
>     > MM using lynne$
>
>     > ------------------------
>
>     > But there's a bit more to it: In my examples above, both --quiet
>     > and --slave where used together with --vanilla.  In general
>     > --slave *also* never saves, i.e., uses the equivalent of
>     > q('no'), where as --quiet does [ask or ...].
>
>     > Last but not least, from very simply reading R's source code on
>     > this, it becomes blatant that you can use  '-s'  instead of '--slave',
>     > but we (R Core) have probably not documented that on purpose (so
>     > we could reserve it for something more important, and redefine
>     > the simple use of '-s' some time in the future ?)
>
>     > So, all those who want to restrict their language could use '-s'
>     > for now.  In addition, we could add  >> one <<  other alias to
>     > --slave, say --subprocess (or --quieter ? or ???)
>     > and one could make that the preferred use some time in the future.
>
>     > Well, these were another two hours of time *not* spent improving
>     > R technically, but spent reading e-mails, source code, and considering.
>     > Maybe well spent, maybe not ...
>
>     > Martin Maechler
>     > ETH Zurich and R Core Team
>
> With in the   R Core Team    we have considered the issue.
>
> As a consequence, I have committed a few minutes ago code changes
> that replace '--slave' by '--no-echo' .
> [This will be in R-devel versions from svn rev 77229 and of
>  course in the "big step" release around April 2020].
>
> Among other considerations, we found that  '--no-echo' was
> really much more self-explaining, as indeed the command line
> option turns off the echo'ing of the R code that is executed,
> and on the C level is indeed very much related to R level
>
>     options(echo = "no")
>
> For back compatibility reasons, the old command line option will
> continue to work so the many shell and other scripts that use
> it, will not stop working.
>
>
> Best regards,
> Martin Maechler
> ETH Zurich and R Core Team
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list