Re: [Rd] R_BATCHSAVE setting in config.site

2005-07-31 Thread Prof Brian Ripley
R is case-sensitive!

'batch mode' does not refer to using the utility `R CMD BATCH' (which you 
called 'BATCH mode' but is not actually running R but running a utility 
that runs R), and which is documented to set --save.

Something like R < input.R is not interactive use, and in Unix parlance is 
'batch' use.  It is the opposite of 'interactive' (see ?interactive). EOF 
is ignored in interactive use of R, but this setting does affect 
interactive use in that you will no longer be asked it you want to save 
the workspace.

This setting should probably be described in the R-admin manual, perhaps 
with a better name.


On Fri, 29 Jul 2005, Douglas Grove wrote:

> Hi,
>
> I just downloaded and installed last nights version of R-patched
> and decided that I'd set R_BATCHSAVE=--no-save in config.site,
> which I haven't done before.
>
> Since the comment above R_BATCHSAVE in config.site says:
>  ## The default behavior of R if it encounters EOF in batch mode.
>  ## Set this to one of '--save' or '--no-save' depending whether you
>  ## want automatic saving of '.RData' or not.
> so I assumed it should only affect BATCH mode.  However, I'm finding
> the opposite, it only affects interactive mode, and *not* BATCH mode.
>
> I configured and made R two different ways, one with R_BATCHSAVE set
> to --no-save and one with it left unset (defaulting to --save).

No, unset is not --save.

> I compared the resulting scripts to one another.  I found that
> there was no difference in the ${R_HOME}/bin/BATCH scripts but there was
> a difference in the ${R_HOME}/bin/R scripts.  When I set R_BATCHSAVE
> to --no-save I got:
>  exec "${R_binary}" --no-save ${args}
> rather instead of:
>  exec "${R_binary}"  ${args}
> one line 175 of /bin/R.
>
> Am I missing something (certainly not an uncommon occurrance) or
> is this a mistake?

A misreading.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

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


Re: [Rd] R_BATCHSAVE setting in config.site

2005-07-31 Thread Douglas Grove
On Sun, 31 Jul 2005, Prof Brian Ripley wrote:

> R is case-sensitive!
> 
> 'batch mode' does not refer to using the utility `R CMD BATCH' (which you 
> called 'BATCH mode' but is not actually running R but running a utility 
> that runs R), and which is documented to set --save.
> 
> Something like R < input.R is not interactive use, and in Unix parlance is 
> 'batch' use.  It is the opposite of 'interactive' (see ?interactive). EOF 
> is ignored in interactive use of R, but this setting does affect 
> interactive use in that you will no longer be asked it you want to save 
> the workspace.

Sorry, I was under the impression (obviously mistaken) that 'batch'
referred to non-interactive use of R, either via R < input.R or 
via the CMD BATCH utility.  It *is* called 'BATCH' after all, so it's
not a great leap to assume it would be considered a 'batch' mode.


> This setting should probably be described in the R-admin manual, perhaps 
> with a better name.

It would be good to mention somewhere (probably in ?quit) that setting
R_SAVEBATCH to --no-save will mess with the default of the 'save'
argument of quit().


Thanks for help,
Doug


> 
> 
> On Fri, 29 Jul 2005, Douglas Grove wrote:
> 
> > Hi,
> >
> > I just downloaded and installed last nights version of R-patched
> > and decided that I'd set R_BATCHSAVE=--no-save in config.site,
> > which I haven't done before.
> >
> > Since the comment above R_BATCHSAVE in config.site says:
> >  ## The default behavior of R if it encounters EOF in batch mode.
> >  ## Set this to one of '--save' or '--no-save' depending whether you
> >  ## want automatic saving of '.RData' or not.
> > so I assumed it should only affect BATCH mode.  However, I'm finding
> > the opposite, it only affects interactive mode, and *not* BATCH mode.
> >
> > I configured and made R two different ways, one with R_BATCHSAVE set
> > to --no-save and one with it left unset (defaulting to --save).
> 
> No, unset is not --save.
> 
> > I compared the resulting scripts to one another.  I found that
> > there was no difference in the ${R_HOME}/bin/BATCH scripts but there was
> > a difference in the ${R_HOME}/bin/R scripts.  When I set R_BATCHSAVE
> > to --no-save I got:
> >  exec "${R_binary}" --no-save ${args}
> > rather instead of:
> >  exec "${R_binary}"  ${args}
> > one line 175 of /bin/R.
> >
> > Am I missing something (certainly not an uncommon occurrance) or
> > is this a mistake?
> 
> A misreading.
> 
> -- 
> Brian D. Ripley,  [EMAIL PROTECTED]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
>

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