Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing new version of data.table (specifically 1.8.11 from Rforge)

According to NEWS, data.table now has melt.

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

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.

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

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.

like image 727
Dean MacGregor Avatar asked Sep 12 '13 18:09

Dean MacGregor


1 Answers

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.


The R-Forge download page contains this text :

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).

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

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.

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.

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

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")

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.

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

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

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.

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.

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.

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.

like image 117
Matt Dowle Avatar answered Nov 16 '22 02:11

Matt Dowle