Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Rcpp in R 2.10 on Ubuntu

Tags:

c++

r

ubuntu

I'm trying to install Rcpp on Ubuntu 10.04 and getting this error (which implies that it doesn't exist):

> install.packages("Rcpp")
Warning in install.packages("Rcpp") :
  argument 'lib' is missing: using '/home/vadmin/R/i486-pc-linux-gnu-library/2.10'
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ‘Rcpp’ is not available

I have a working R instance and have installed many other packages.

Edit

Now I'm getting this error when running R CMD build Rcpp on the source code off svn:

** building package indices ... Error : running Stangle on vignette '/home/vadmin/src/R/rcpp/pkg/Rcpp/inst/doc/Rcpp-modules.Rnw' failed with message: invalid value for 'lang' : cpp ERROR: installing package indices failed * removing ‘/tmp/Rinst3041838816/Rcpp’ ERROR Installation failed.

like image 938
griffin Avatar asked Aug 02 '10 20:08

griffin


2 Answers

A few things:

  • thanks for your interest in Rcpp :-)

  • it has been on CRAN as Rcpp for years; if you get a Rcpp not available error then you are looking at a bad CRAN mirror and I suggest using a different one

  • Ubuntu also has their Rcpp version of the Rcpp Debian package so you could just do 'sudo apt-get install r-cran-rcpp' (but that may be a dated version, alas)

In general, Romain and I suggest for Rcpp questions to come to the rcpp-devel list.

like image 146
Dirk Eddelbuettel Avatar answered Nov 09 '22 13:11

Dirk Eddelbuettel


I'm J.I.Perotti from Argentina. First, sorry for my english. I had the same problem as stated here. But I solve it and may be useful to others. I have Ubuntu 9.10 Karmic Koala on a Pentium Dual Core T4200 (x86_64), successfully upgraded R to the 2.12.1 version, and then successfully installed Rcpp version 0.9.0

I make a kind of logbook with the process which I wrote in my blog:

http://deliriosderayohauno.blogspot.com/2011/01/r-installation.html

I don't know so much about this page, so I hope not write this where I should not (sorry if it is the case).

Best regards

like image 38
J.I.Perotti Avatar answered Nov 09 '22 13:11

J.I.Perotti