I have read Hadley guide to vignettes and I can't find any information about this. How are the vignettes build? My problem is that it seems that they are build with the suggested packages attached and loaded.
As far as I could test, if I knit it on the console in Rstudio it uses the same environment as the console.
I digged into devtools::build_vignettes
but it seems to depend on tools::buildVignettes
which I can't understand and seems like the default used when building a package with R CMD build
.
This is related to my efforts to solve this question
When building the package the environment for all the vignettes is shared. So if vignette V1 loads package A, B and C, it will be already loaded for vignette V2 if V2 is build before V1.
That was what I learn from Martin Morgan at Bioconductor mailing list . I couldn't find any other document explaining it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.