Rbuildignore和排除目录 [英] Rbuildignore and Excluding Directories
问题描述
我有兴趣在构建和安装软件包时排除两个目录inst\docs
和inst\examples
.我知道一个简单的方法就是将docs
和examples
移至根目录,并且不会安装它们.但是,出于其他原因,我想将它们保留在inst
中.
I am interested in excluding two directories inst\docs
and inst\examples
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
从源代码构建和安装软件包.但是,当我这样做时,仍然看到inst\docs
和inst\examples
被安装.我尝试了不同的正则表达式,但似乎无济于事.
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 inst\docs
and inst\examples
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屋!