安装新版本的 data.table(特别是 Rforge 的 1.8.11) [英] Installing new version of data.table (specifically 1.8.11 from Rforge)

查看:23
本文介绍了安装新版本的 data.table(特别是 Rforge 的 1.8.11)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据NEWS,数据.table 现在已经融化了.

According to NEWS, data.table now has melt.

我看到它并去下载 data.table 1.8.11,当我去安装它时,我收到一个错误,它不适用于 R 2.15.3(这是我使用的版本).基于此,我更新到 R 3.0.1 并尝试再次安装它......

I saw that and went to download data.table 1.8.11 and when I went to install it I got an error that it is unavailable for R 2.15.3 (which is the version I was on). Based on that I updated to R 3.0.1 and tried to install it again...

> install.packages("C:/[path]/data.table_1.8.11.zip", repos = NULL)
 Warning in install.packages :
 package ‘C:/[path]/data.table_1.8.11.zip’ is not available (for R version 3.0.1)
 package ‘data.table’ successfully unpacked and MD5 sums checked

如果我这样做 packageVersion("data.table") 我得到 1.8.11 但如果我这样做 ?melt.data.table我知道它没有文档.

if I do packageVersion("data.table") I get 1.8.11 but if I do ?melt.data.table I get there's no documentation for it.

如果我卸载 data.table,我可以从 CRAN 重新安装 data.table 1.8.10 而不会出现任何错误.

If I uninstall data.table I can then reinstall data.table 1.8.10 from CRAN without getting any errors.

有谁知道为什么我在使用较新版本的 data.table 时会出现这些错误?从 C 盘路径可以看出我在 Windows 上.

Does anyone know why I'm getting these errors with the newer version of data.table? As you can tell from the C drive path I'm on Windows.

推荐答案

UPDATE:R-Forge 问题现在似乎已经解决,data.table 开发版本再次更新(v1.8.11 的 rev 965),包括 Windows .zip.如果再次发生,以下信息仍然有效.

UPDATE: The R-Forge problem now appears to have cleared and the data.table development version is up to date again (rev 965 of v1.8.11) including a Windows .zip. The information below is still relevant if it happens again.

R-Forge 下载页面包含以下文字:

重要提示包二进制文件:R-Forge 仅为最新版本的 R 提供这些二进制文件,但不为旧版本提供.为了成功安装 R-Forge 上提供的包,您必须切换到最新版本的 R,或者从包源 (.tar.gz) 安装.

Important note for package binaries: R-Forge provides these binaries only for the most recent version of R, but not for older versions. In order to successfully install the packages provided on R-Forge, you have to switch to the most recent version of R or, alternatively, install from the package sources (.tar.gz).

最新版本的 R 是 3.0.1,所以升级到它是正确的.

The most recent version of R is 3.0.1, so you did right by upgrading to it.

但是 R-Forge 二进制构建过程目前被破坏了,不幸的是这种情况经常发生.您可以判断它已损坏,因为它永久处于构建"状态,并且最后一次更新日期是 8 月 29 日.这很重要,因为您使用的是 Windows,显然,对于大多数用户来说安装 Rtools 允许他们从源代码构建.

But the R-Forge binary build process is broken at the moment, which unfortunately is often the case. You can tell it's broken because it's in "building" state permanently, and the last update date is 29 Aug. This only matters because you're on Windows where, apparently, it's either too difficult or prevented for most users to install Rtools which allows them to build from source.

这就是为什么我会定期将最新稳定开发版本的 Windows .zip 上传到 主页.但是自从添加了 melt 之后,这还没有完成.

Which is why I periodically upload a .zip for Windows of the latest stable development version to the homepage. But this hasn't been done since melt was added.

我已经让 R-Forge 团队知道 这里和其他人一样,但已经好几个星期了.

I've let the R-Forge team know here as have other people, but it has been outstanding several weeks.

要在 Mac 和 Linux(以及安装了 Rtools 的 Windows 上)从源代码构建它是:

To build from source on Mac and Linux (and on Windows with Rtools installed) it's :

install.packages("data.table",
                 repos= "http://R-Forge.R-project.org",
                 type="source")

但是这会抓取 R-Forge 上的最后一个 tar.gz,它是由相同(当前已损坏)R-Forge 构建过程的第一阶段构建的.所以这目前也很陈旧.事实上,正如 Dean 在评论中发现的那样,在 CRAN 的最新版本之前.

But this grabs the last tar.gz on R-Forge, which is built by the first stage of the same (currently broken) R-Forge build process. So that is currently very stale too. In fact before the latest release to CRAN, as Dean has found in comments.

所以要自己构建最新的 tar.gz,它是:

So to build the latest tar.gz yourself, it's :

svn checkout svn://svn.r-forge.r-project.org/svnroot/datatable/
R CMD build pkg
# and now since you're at the DOS prompt anyway you may as well do :
R CMD INSTALL data.table_1.8.11.tar.gz

参见 6.3 部分.1 R 安装和管理手册的 Windows.您可能还需要安装 SVN.

And see section 6.3.1 Windows of the R Installation and Administration manual. You may need to install SVN, too.

如果 R-Forge 的通宵构建经常被破坏,那么我们不妨转移到 GitHub.在 Windows 上,你肯定需要安装 Rtools,然后使用 Hadley 的工具从 github 的源代码构建.或者我可以继续在 Windows 上编译(使用 win-builder)并提供 .zip在 data.table 主页上.

If the overnight build of R-Forge is broken so often, then we may as well move to GitHub. On Windows you would then definitely need to install Rtools, and then use Hadley's tools to build from source from github. Or I could continue to compile on Windows (using win-builder) and provide a .zip on the data.table homepage.

但我们在这里只讨论开发版本.CRAN 系统在所有平台上都非常可靠.CRAN 每天检查 data.table 这里.

But we're only talking the development version here. The CRAN system is ultra reliable on all platforms. CRAN checks data.table every day here.

顺便说一句,一旦 R-Forge 检测到有新的提交,它似乎会在开始构建新的 .zip 之前删除现有的 .zip.如果它在新的构建准备好之前将之前的构建保留在适当的位置会更好.每当 R-Forge 处于您想要的包的构建状态时,您总是会看到您报告的不可用"消息.

Btw, as soon as R-Forge detects a new commit has been made, it appears to remove the existing .zip before it starts to build the new one. It would be better if it left the previous build in place until the new one was ready. You always see the "not available" message you've reported whenever R-Forge is in building state for the package you want.

如果我们不喜欢这样,我们可以自己更改.R-Forge 本身是开源的;也就是说,它的构建过程本身就是 R-Forge 包,任何人都可以检查、调试和建议对 (IIUC) 的更改.可以在这里找到它们.

If we don't like this, we can change it ourselves. R-Forge itself is open source; i.e., its build processes are themselves R-Forge packages which anyone can inspect, debug and suggest changes to (IIUC). They can be found here.

这篇关于安装新版本的 data.table(特别是 Rforge 的 1.8.11)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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