Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build an archived package on R 3.0.0

Tags:

r

Recently R 3.0.0 was rolled out. One of the requirements was that "Packages need to be (re-)installed under this version (3.0.0) of R."

The problem occurs when you have packages that have been archived. In an OS independent way how do you build packages like uroot? As you can see the package is archived.

like image 800
Tyler Rinker Avatar asked Apr 12 '13 14:04

Tyler Rinker


1 Answers

The easiest way to build a package from the archive is to use devtools:

library(devtools)
install_url("http://cran.r-project.org/src/contrib/Archive/uroot/uroot_1.4.tar.gz")

There are three challenges:

  • You need to have a working development environment. On windows, this means you need Rtools; on the mac, the xcode command line tools; and on linux, the appropriate development packages

  • There is currently a bug in devtools which means it doesn't find the right version of Rtools on windows. A fix is on its way to CRAN.

  • There's normally a good reason that a package has been put in the archive: it's likely that it does not pass R CMD check in the current version of R, so even once you've installed it, it might not work correctly. Be careful!

like image 161
hadley Avatar answered Nov 09 '22 23:11

hadley