Rbuildignore 和排除目录 [英] Rbuildignore and Excluding Directories
问题描述
我有兴趣在构建和安装软件包时排除两个目录 instdocs
和 instexamples
.我知道一个简单的方法就是将 docs
和 examples
移动到根目录,它们不会被安装.但是,出于其他原因,我想将它们保留在 inst
中.
I am interested in excluding two directories instdocs
and instexamples
while building and installing the package. I know that an easy way out is just to move docs
and examples
to the root directory and they won't get installed. However, I want to keep them in inst
for other reasons.
我尝试将以下行添加到 .Rbuildignore
I tried adding the following lines to .Rbuildignore
inst/docs
inst/examples
我使用 RStudio v 0.97 和 devtools
从源代码构建和安装包.但是,当我这样做时,我仍然看到 instdocs
和 instexamples
已安装.我尝试了不同的正则表达式,但似乎没有任何效果.
I use RStudio v 0.97 and devtools
to build and install the package from source. However, when I do that, I still see that instdocs
and instexamples
get installed. I tried different regexes, but nothing seemed to work.
我做错了吗?
推荐答案
这似乎是 RStudio 的问题.使用 devtools 包中的 install
似乎会导致文件夹被忽略.直接从命令行构建和安装似乎也会导致文件夹被忽略.'建造&但是,RStudio 中的重新加载"按钮似乎没有考虑这些文件夹的 .Rbuildignore.
This appears to be an issue with RStudio. Using install
from the devtools package seems to cause the folders to be ignored. Building and installing directly from the command line also seems to cause the folders to be ignored. The 'Build & Reload' button in RStudio, however, seems to not take into account the .Rbuildignore for those folders.
这篇关于Rbuildignore 和排除目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!