3

Error in loadNamespace(name) : there is no package called 'Rcpp' ... Error in loadNamespace(name) : there is no package called 'RInside'

I get the above error when trying make on the examples of RInside.

RInside is in the user-library. So I set R_LIBS_USER to the directory in the Makefile.

R_LIBS_USER := "C:/users/Me/Documents/R/win-library/3.0"

but that does not work either.

Thanks for any advice.

EDIT:

It works fine if the packages are in "C:/R/R-3.0.2/library". R_LIBS_USER doesn't seem to work on Windows.

user2296153
  • 612
  • 1
  • 7
  • 15

3 Answers3

2

I fear this is local to your end.

If Rcpp and RInside are in fact in your default library location (and on Windows I sometimes copy them) then the examples build, as does the rest of the package. Recall that all this works for CRAN and the win-builder.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • I copy-pasta-ed the directory into .libPaths("here") and it did load Rcpp and RInside just fine. There has to be some way to debug that problem?! – user2296153 Dec 13 '13 at 15:07
  • Read 'Writing R Extensions' carefully. – Dirk Eddelbuettel Dec 13 '13 at 15:12
  • Which part? I never had troubles compiling packages. – user2296153 Dec 13 '13 at 15:23
  • Works for me. There are a number of ways to set it: `.libPaths()`, the various environment variables, `R_LIBS`. Maybe it is the 'R Inst. & Admin' manual instead. Also see `help(Startup)`. In any event _there is no Rcpp issue here_ but simply a problem between you, R and your library directories. – Dirk Eddelbuettel Dec 13 '13 at 15:26
2

I was also having the same problem and read Dirk's reply and just ran

 install.packages("Rcpp", dependencies = TRUE)
 install.packages("RInside", dependencies = TRUE)

and it is working fine now.

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
1

I know the question was asked long back. But I faced the same problem while using R from python (Anaconda). Also I didnt find an reasonable explanation for it. Finally this is what worked for me.

import rpy2.robjects as ro

ro.r('''.libPaths('C:/Users/<remaining path>/R/win-library/3.1')''')

RSVM = importr('e1071')
Taryn
  • 242,637
  • 56
  • 362
  • 405
Learner
  • 157
  • 3
  • 15