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

2019-09-27 Thread William Michels via R-help
Apologies, Duncan and Martin. I didn't check "R --help" first. You're
quite right, lots of embedded hyphens.

Best Regards, Bill.

W. Michels, Ph.D.

On Fri, Sep 27, 2019 at 2:42 PM Duncan Murdoch  wrote:
>
> 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
> >  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 "--" 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@lynne$ echo '(i <- 1:3)
> >>  > i*10' | R-3.6.1 --slave --vanilla
> >>  >> [1] 1 2 3
> >>  > [1] 10 20 30
> >>  > MM@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@lynne$ cat $f
> >>  > [1] 1 2 3
> >>  > [1] 10 20 30
> >>
> >>  > --quiet :
> >>  > 
> >>
> >>  > MM@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@lynne$ cat $f
> >>  >> (i <- 1:3)
> >>  > [1] 1 2 3
> >>  >> i*10
> >>  > [1] 10 20 30
> >>  >>
> >>  > MM@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.
> >>
> >>  > 

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

2019-09-27 Thread Duncan Murdoch

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
 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 "--" 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@lynne$ echo '(i <- 1:3)
 > i*10' | R-3.6.1 --slave --vanilla
 >> [1] 1 2 3
 > [1] 10 20 30
 > MM@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@lynne$ cat $f
 > [1] 1 2 3
 > [1] 10 20 30

 > --quiet :
 > 

 > MM@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@lynne$ cat $f
 >> (i <- 1:3)
 > [1] 1 2 3
 >> i*10
 > [1] 10 20 30
 >>
 > MM@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 Teamwe 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 

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

2019-09-27 Thread William Michels via R-help
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
 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 "--" 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@lynne$ echo '(i <- 1:3)
> > i*10' | R-3.6.1 --slave --vanilla
> >> [1] 1 2 3
> > [1] 10 20 30
> > MM@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@lynne$ cat $f
> > [1] 1 2 3
> > [1] 10 20 30
>
> > --quiet :
> > 
>
> > MM@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@lynne$ cat $f
> >> (i <- 1:3)
> > [1] 1 2 3
> >> i*10
> > [1] 10 20 30
> >>
> > MM@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 Teamwe 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 

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

2019-09-27 Thread Jim Lemon
On Sat, Sep 28, 2019 at 2:04 AM Martin Maechler
 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

__
R-help@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.


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

2019-09-27 Thread Martin Maechler
> 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 "--" 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@lynne$ echo '(i <- 1:3)
> i*10' | R-3.6.1 --slave --vanilla
>> [1] 1 2 3
> [1] 10 20 30
> MM@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@lynne$ cat $f
> [1] 1 2 3
> [1] 10 20 30

> --quiet :
> 

> MM@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@lynne$ cat $f
>> (i <- 1:3)
> [1] 1 2 3
>> i*10
> [1] 10 20 30
>> 
> MM@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 Teamwe 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@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.