I'm writing a procedure here that I always forget, and have to reconstruct each time. Maybe I'll remember I put it here, and maybe someone else will save some time by using it:

A useful check on vignette reproducibility is to have a vignette.Rout.save file in the vignettes directory. This is a file of output from running the R code in the vignette, and R CMD check compares the output it sees to your saved file.

A problem I always have is remembering the way to produce this file from the vignette. The easiest way I know is the following:

- create a file vignette.Rout.save in the appropriate place, containing junk.

 - Then build the package and run R CMD check on it.

The check will complain about the mismatch between the junk in the save file and the actual output produced from your vignette, and will save a file with a name like "vignette.Rnw.log" or "vignette.Rmd.log" in the package.Rcheck directory. That's the file that should become vignette.Rout.save.

I assume there's a good reason why the file isn't called "vignette.Rout" or similar, but using "log" sure makes it hard to remember.

Duncan Murdoch

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to