Martin Maechler
2019-Sep-27 16:03 UTC
[R] The "--slave" option ==> will become "--no-echo"
>>>>> 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 at lynne$ echo '(i <- 1:3) > i*10' | R-3.6.1 --slave --vanilla >> [1] 1 2 3 > [1] 10 20 30 > MM at 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 at lynne$ cat $f > [1] 1 2 3 > [1] 10 20 30 > --quiet : > ------------------------ > MM at 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 at lynne$ cat $f >> (i <- 1:3) > [1] 1 2 3 >> i*10 > [1] 10 20 30 >> > MM at 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
On Sat, Sep 28, 2019 at 2:04 AM Martin Maechler <maechler at stat.math.ethz.ch> wrote:> > 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. >That's a relief. I was getting worried that we would become: The knights who cannot say BS. Jim
William Michels
2019-Sep-27 21:36 UTC
[R] The "--slave" option ==> will become "--no-echo"
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 at 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 at lynne$ echo '(i <- 1:3) > > i*10' | R-3.6.1 --slave --vanilla > >> [1] 1 2 3 > > [1] 10 20 30 > > MM at 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 at lynne$ cat $f > > [1] 1 2 3 > > [1] 10 20 30 > > > --quiet : > > ------------------------ > > > MM at 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 at lynne$ cat $f > >> (i <- 1:3) > > [1] 1 2 3 > >> i*10 > > [1] 10 20 30 > >> > > MM at 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 at 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.
On 27/09/2019 5:36 p.m., William Michels via R-help wrote:> Hi Martin, > > '--no-echo' > > ....or.... > > '--no_echo' > > Obviously you may prefer the first, but I hope you might consider the second.Are you serious? That's a terrible suggestion. Run "R --help" and you'll see *no* options with underscores, and a dozen with embedded hyphens. Duncan Murdoch> > Best Regards, > > W. Michels, Ph.D. > > > On Fri, Sep 27, 2019 at 9:04 AM Martin Maechler > <maechler at 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 at lynne$ echo '(i <- 1:3) >> > i*10' | R-3.6.1 --slave --vanilla >> >> [1] 1 2 3 >> > [1] 10 20 30 >> > MM at 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 at lynne$ cat $f >> > [1] 1 2 3 >> > [1] 10 20 30 >> >> > --quiet : >> > ------------------------ >> >> > MM at 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 at lynne$ cat $f >> >> (i <- 1:3) >> > [1] 1 2 3 >> >> i*10 >> > [1] 10 20 30 >> >> >> > MM at 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 at 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. > > ______________________________________________ > R-help at 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. >
Rolf Turner
2019-Sep-28 05:25 UTC
[R] [FORGED] Re: The "--slave" option ==> will become "--no-echo"
On 28/09/19 9:16 AM, Jim Lemon wrote:> On Sat, Sep 28, 2019 at 2:04 AM Martin Maechler > <maechler at stat.math.ethz.ch> wrote: >> >> 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. >> > That's a relief. I was getting worried that we would become: > > The knights who cannot say BS.Right on Jim! cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276