简体   繁体   English

构建包时,晕影是否在新的R会话中构建?

[英]Are vignettes build in a fresh R session when building a package?

I have read Hadley guide to vignettes and I can't find any information about this. 我已经阅读了Hadley的小插图指南 ,我找不到任何有关此内容的信息。 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. 据我测试,如果我在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但它似乎依赖于tools::buildVignettes ,我无法理解它们,看起来像是在构建具有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. 构建包时,共享所有vignet的环境。 So if vignette V1 loads package A, B and C, it will be already loaded for vignette V2 if V2 is build before V1. 因此,如果插图V1加载包A,B和C,如果在V1之前构建V2,则它将已加载为插图V2。

That was what I learn from Martin Morgan at Bioconductor mailing list . 这就是我从Bioconductor 邮件列表中的 Martin Morgan那里学到的。 I couldn't find any other document explaining it. 我找不到任何解释它的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM