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.
我已阅读Hadley的小插图指南,但我找不到任何有关此内容的信息。小插曲是如何构建的?我的问题是它们似乎是在附加和加载建议的包的情况下构建的。
As far as I could test, if I knit it on the console in Rstudio it uses the same environment as the console.
据我测试,如果我在Rstudio的控制台上编织它,它使用与控制台相同的环境。
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
.
我深入研究devtools :: build_vignettes,但它似乎依赖于我无法理解的工具:: buildVignettes,看起来像构建具有R CMD构建的软件包时使用的默认值。
This is related to my efforts to solve this question
这与我解决这个问题的努力有关
1 个解决方案
#1
0
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.
构建包时,共享所有vignet的环境。因此,如果插图V1加载包A,B和C,如果在V1之前构建V2,则它将已加载为插图V2。
That was what I learn from Martin Morgan at Bioconductor mailing list. I couldn't find any other document explaining it.
这就是我从Bioconductor邮件列表中的Martin Morgan那里学到的。我找不到任何解释它的文件。
#1
0
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.
构建包时,共享所有vignet的环境。因此,如果插图V1加载包A,B和C,如果在V1之前构建V2,则它将已加载为插图V2。
That was what I learn from Martin Morgan at Bioconductor mailing list. I couldn't find any other document explaining it.
这就是我从Bioconductor邮件列表中的Martin Morgan那里学到的。我找不到任何解释它的文件。