tags:

views:

102

answers:

2

This is related to an ongoing issue that I'm having, where certain packages don't exist when I try install.packages in R 2.10 (which is what's available from Ubuntu 10.04 apt-get). This includes highlight and Rcpp. Does anyone know how to install R 2.11 on Ubuntu 10.04?

+1  A: 

Installing R on Ubuntu

NullUserException
Thanks...already saw that page. I don't see where it explains how to install a version of R beyond the version that's installed by `sudo apt-get install r-base-dev` (which is R 2.10). Am I missing something?
griffin
The instructions on that page should give you 2.11. I use this mirror: "deb http://cran.ms.unimelb.edu.au/bin/linux/ubuntu lucid/" and I get 2.11.
neilfws
+1  A: 

NullUserException is correct. This should be your first choice. Vincent and Michael do a great job with these "ports" of the Debian packages I maintain. I actually use those "ported" packages myself on the Ubuntu machines I use.

If however you want to stay with the standard Ubuntu distribution, things will work as well. You must be doing something wrong (and you didn't show what you did) as install.packages() works just fine against CRAN mirrors whether your run an R binary from Ubuntu or the CRAN-for-Ubuntu repo referenced above.

Moreover, you can also work from source -- which is in fact how many of us develop our packages on Ubuntu and/or Debian.

Lastly, for questions like this, the r-sig-debian list is an excellent resource with friendly and timely replies for R on Debian / Ubuntu questions. Subscribe before you can post, though.

Dirk Eddelbuettel
Thanks Dirk. I really don't think that I'm doing anything wrong; on my windows machine with R 2.10 I get `any((available.packages()[,"Package"])=="Rcpp") ==> TRUE`, but on my Ubuntu machine the exact same command on the same mirror returns `FALSE`. Same for the highlight package. And to make matters worse, I can't build from source since there's a dependency loop: `Rcpp` depends on `highlight`, and `highlight` depends on `Rcpp`. So R CMD check fails unless they are already installed.
griffin
Quick guess: you are the R binary from Ubuntu? Version 2.9.2 or something? That is *too old* for CRAN and the Depends: R (>= 2.10) we have in the code. Upgrading to binaries for Ubuntu from CRAN gives you R 2.11.1 and everything changes. Lastly, Rcpp does *not* depend on highlight. It suggests it to build the vignette, but you can install it without rebuilding the vignette.
Dirk Eddelbuettel
Also, which Ubuntu version? Either, way Ubuntu-from-CRAN binaries will get you R 2.11.1 for any of the more recent Ubuntu releases.
Dirk Eddelbuettel
Ubuntu 10.04. I'm sorry...I'm clearly not an expert at this. When I do apt-get, it goes for R 2.10. I might be missing something, but short of building R 2.11 from source, is there an easy way to get it, or should I be switching to Debian. :)
griffin
I cannot help you anymore on 100-char messages. Subscribe to r-sig-debian and we will help you there. There is a reason mailing lists exists for somewhat deeper discussions.
Dirk Eddelbuettel