[R] R_BATCH_OPTIONS not respected?

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Tue Sep 10 12:38:19 CEST 2019


>>>>> Marius Hofert 
>>>>>     on Mon, 9 Sep 2019 22:38:38 +0200 writes:

    > Hi,
    > I typically start R with "--no-restore --no-save" (to avoid .RData
    > files being written) and would like to have the same behavior under 'R
    > CMD BATCH'. I use R_BATCH_OPTIONS="--no-restore --no-save" in my
    > ~/.Renviron but running an R script with 'R CMD BATCH' still produces
    > a .RData file. What's the correct way of getting the '--no-restore
    > --no-save' options when in batch mode?

    > (This is on macOS 10.14.6 with R version 3.6.1)

Maybe macOS is the problem?

It works fine on Linux:

export R_BATCH_OPTIONS='--no-save --no-restore'
R CMD BATCH <some>.R 

produces  <some>.Rout and nothing else  for me


Martin

    > Thanks & cheers,
    > M

    > ______________________________________________
    > 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