Skip to content
Prev 48106 / 63424 Next

R 3.1.0: 'R CMD Sweave' deletes non tex files created upon batch mode exit

Hi Martin,

I use R CMD Sweave often as well, so thanks for looking into this. I 
have now tested some of my scripts with R-devel revision 65449 
(2014-04-22) on 64-Bit Linux Mint 14.

I can confirm Marc's report that running R CMD Sweave no longer deletes 
graphic files and retains created non-tex files (eps and/or pdf).

What does not behave as before is the output printed to stdout, which 
before listed the number and name of each  code chunk it processed and 
also the options. It now outputs only any Sweave errors or messages from 
within R, and finishes with Output file: foo.tex

In case all works fine and no messages are printed, all that is written 
to stdout is Output file: foo.tex after R CMD Sweave processed the .Rnw.

In an R version prior to 3.1.0 output was e.g.,

Writing to file foo.tex
Processing code chunks with options ...
  1 : keep.source (label = setup, foo.Rnw:22)
  2 : keep.source term verbatim (label = packages, foo.Rnw:90)
  3 : keep.source term verbatim (label = data, foo:148)
...

It still outputs this information when running Sweave from within R if I 
say e.g.,

R> Sweave("foo.Rnw")

I'm not sure whether the new behavior of not printing information to 
stdout for R CMD Sweave is intended or not, but I thought I'll report it 
along with confirming R CMD Sweave no works again for me.

Best wishes
Thomas



 > sessionInfo()
R Under development (unstable) (2014-04-22 r65449)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base