Rbuildignore和排除目录 [英] Rbuildignore and Excluding Directories

查看:215
本文介绍了Rbuildignore和排除目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣在构建和安装软件包时排除两个目录inst\docsinst\examples.我知道一个简单的方法就是将docsexamples移至根目录,并且不会安装它们.但是,出于其他原因,我想将它们保留在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\docsinst\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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆