[R-pkg-devel] Something I always forget...

Spencer Graves @pencer@gr@ve@ @end|ng |rom e||ect|vede|en@e@org
Sun Dec 14 22:55:33 CET 2025


Should something about this be appropriate in "R Packages: Learn how to 
create a package, the fundamental unit of shareable, reusable, and 
reproducible R code" by Hadley Wickham and Jennifer Bryan -- in their 
current chapter 17. Vignettes?


https://r-pkgs.org/vignettes.html


I recently studied that book and created two packages using my 
understanding of their recommendations, including using Roxygen2. I 
remember wondering about things like what Duncan recommends.


Spencer Graves


On 12/14/25 15:13, Duncan Murdoch wrote:
> 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
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list