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

chatzich picture chatzich · May 26, 2013 · Viewed 89.9k times · Source

I am trying to embed RInside to my application on win7 64-bit system but when I initialize an RInside:

Rin = new RInside(argc, argv);

the following message appears:

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

This error only occurs with Windows.

Answer

Dirk Eddelbuettel picture Dirk Eddelbuettel · May 26, 2013

I think you get that issue when your .libPaths() differ--in other words run the .libPaths() function to see the paths stored by R for its use. Then check where RInside is installed, and make sure Rcpp is installed there too. It is a setup issue.

In other words, it should work if you have Rcpp and RInside installed where the basic R libraries are. Otherwise you have to tell the (embedded) R session about the other location (and before it starts).

There are more Windows users on the list, so you could try asking on rcpp-devel.