R 3.0.1 包构建警告 [英] R 3.0.1 package build warning

查看:42
本文介绍了R 3.0.1 包构建警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Windows 机器上的 R 3.0.1 中构建 R 包,使用 Rtools30 和与 RStudio 关联的构建"工具,我认为它与 devtools(这是最新的)相关联.我构建包的典型过程是:

I'm building R packages in R 3.0.1 on a Windows machine, using Rtools30 and the 'Build' tools associated with RStudio, which I assume is tied in with devtools (which is up-to-date). My typical process to build a package is:

  1. 加载所有
  2. 再氧化
  3. 构建和重新加载
  4. 检查
  5. 构建源包

如果一切顺利,没有错误或警告,那么我:

If everything goes without errors or warnings, I then:

    install.packages("foo.tar.gz", repos=NULL, type="source")

自从升级到 R 3.0.1 后,我现在收到此警告:

Since upgrading to R 3.0.1, I now get this warning:

   Warning in install.packages : 
      foo.tar.gz is not available (for R version 3.0.1)

我在安装之前也试过了,还是没有去掉警告:

I also tried before installing, and it did not get rid of the warning:

    options(install.packages.check.source = FALSE)

另外,当我打开 devtools 库时,我注意到这个警告:

Also, I notice this warning when I open the devtools library:

    WARNING: Rtools 3.0 found on the path at c:/Rtools is not compatible with R 3.0.1.

奇怪的是,从 R > 2.15.1 到 R 3.0.x,Rtools 3.0 应该很好

Which is weird, Rtools 3.0 is suppose to be good from R >2.15.1 to R 3.0.x

知道发生了什么吗?

推荐答案

这是特定于 RStudio 的,因为它们包装和/或更改了实用程序中的许多功能以实现更好的集成.问题在于调用 getDependencies() 来检查依赖关系.但该函数还将检查原始包是否存在于 CRAN 上,并在不存在时抛出给定的警告.您刚刚在自己的计算机上构建的软件包显然不在 CRAN 上,因此发出警告.

This is RStudio specific, as they wrap and/or changed a lot of functions from the utils for better integration. The problem lies with a call to getDependencies() to check for dependencies. But that function will also check whether the original package exists on CRAN and throws the given warning when it doesn't. A package you just built on your own computer is obviously not on CRAN, hence the warning.

在本机 install.packages() 的源代码中,如果您分别从源代码构建或从不同的存储库安装,则不会调用 getDependencies().另一方面,RStudio 在将所有内容传递给本机 install.packages() 函数之前调用 getDependencies().

In the source of the native install.packages(), getDependencies() isn't called in case you build from source or install from a different repository respectively. RStudio on the other hand calls getDependencies() before it passes everything on to the native install.packages() function.

据我所知,除了使人感到困惑之外,这没有其他影响.我没有找到在 RStudio 中方便地摆脱这种情况的方法,因为 suppressWarnings() 在这种情况下不起作用,因为 RStudio 处理这个问题的方式很复杂.

This has to my knowledge no further effects, apart from confusing people. I didn't find a way to conveniently get rid of this in RStudio, as suppressWarnings() doesn't work in this context due to the complex way RStudio deals with this.

在基本的 R 控制台中,您应该没有任何问题.

In a basic R console, you shouldn't have any problem.

所以暂时,我会忽略这个,希望 RStudio 团队能抽出时间来处理这个小故障.

So for the time being, I'd just ignore this and hope the RStudio team finds time to take care of this minor glitch.

这篇关于R 3.0.1 包构建警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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