[Rd] Generate .Rout.save files for vignettes
benjamin.hofner at fau.de
Mon Dec 10 17:45:52 CET 2012
I am looking for a way to generate .Rout.save files for vignettes.
The manual "Writing R Extensions" states here  in item number 20:
"If there is a target output file .Rout.save in the vignette source
directory, the output from running the code in that vignette is compared
with the target output file."
Yet, there is no pointer on how to get the correct .Rout.save files for
vignettes. (For the files in directory "test" there is a footnote on how
to get the .Rout.save files. )
As a temporary solution, we currently use a script that calls
tools:::.run_one_vignette() on each vignette and dumps the output:
echo 'tools:::.run_one_vignette("vignette.Rnw", docDir = ".");' | R
--vanilla > vignette.Rout.save
However, this doesn't result in the same code as produced by R CMD
check. E.g., we get the R startup header and furthermore get the output
in German where localization is available (thus having differences when
running R CMD check).
Does anyone have any hints on how to automatically get the correct
results (i.e., without the header)? And is it possible to include these
hints in the "Writing R extensions" manual for other users?
Any help is highly appreciated.
More information about the R-devel