0

Some development versions of R packages are hosted on google code and/or launchpad.net.

Is it possible to install the newest release of these packages directly from google code and/or launchpad.net as from other repositories?

ie. not downloading the source from the site through a browser and then attempting to install the source

If so, how?

The package I wish to install is "igraph".

The development version of this package seems to be hosted at:

http://code.google.com/p/igraph/downloads/list
and
https://code.launchpad.net/~igraph/igraph/0.6-main

As a bonus, is it possible to do the same for packages hosted on sourceforge.net?

PS: I believe this is different enough from my past question to warrant a separate question: How to install development version of R packages github repository

Community
  • 1
  • 1
Etienne Low-Décarie
  • 13,063
  • 17
  • 65
  • 87

3 Answers3

1

You must build from source, unless the developer provides a pre-built binary for your specific system (OS and R version).

Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
1

Using the devtools package, there is an install_url function which will automate the process of downloading the source code, building the package, and installing it.

install_url("http://igraph.googlecode.com/files/igraph_nightly_0.6-2689-20120412.tar.gz")
Brian Diggs
  • 57,757
  • 13
  • 166
  • 188
  • Thanks a lot! @Brian Diggs, how did you find this URL in the first place? I don't seem to be able to navigate to http://igraph.googlecode.com (or /files...). I was trying to do this with links found in http://code.google.com/p/igraph/downloads/list to no avail. – Etienne Low-Décarie Apr 20 '12 at 20:28
  • Clicking on `igraph_nightly_0.6-2689-20120412.tar.gz` on http://code.google.com/p/igraph/downloads/list takes you to `http://code.google.com/p/igraph/downloads/detail?name=igraph_nightly_0.6-2689-20120412.tar.gz&can=2&q=` which has the link to the actual tar.gz file on it. – Brian Diggs Apr 20 '12 at 20:45
  • thank you! My browser starts download directly from http://code.google.com/p/igraph/downloads/detail?name=igraph_nightly_0.6-2689-20120412.tar.gz&can=2&q= and I could not seem to get it to provide me the link of the download file. – Etienne Low-Décarie Apr 22 '12 at 00:19
  • PS: install_url requires the "make" command line tool which is installed on OS X by installing Xcode. – Etienne Low-Décarie Apr 23 '12 at 13:57
  • It actually requires the full build system, including compilers if the package contains code to compile. `install_url` just makes the download/build/install process easier; all the steps still have to be done and prerequisites (build system, etc.) met. – Brian Diggs Apr 23 '12 at 15:30
1

To not download source requires someone to build the binary for you. That only happens for CRAN, R-Forge and RForge.net packages, so you are out of luck.

Installing from source is the way to go.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725