[Rcpp-devel] Rinside libPaths configuration

Dirk Eddelbuettel edd at debian.org
Thu Aug 27 20:34:17 CEST 2020

On 27 August 2020 at 10:58, Toby Hocking wrote:
| Hi all,
| I'm having this issue
| https://stackoverflow.com/questions/16758129/error-in-loadnamespacename-there-is-no-package-called-rcpp
| Rcpp is installed in ~/R/x86_64-pc-linux-gnu-library/4.0
| But my RInside compiled binary looks for packages in ~/lib/R/library
| Is there a way to configure the default library when I compile my command
| line program with RInside?

Should be. There is no hidden magic anywhere.  RInside uses values it sees
when building.  Having an identical .libPaths() (or R_LIBS_USER /
R_LIBS_SITE) should be all you need.

Maybe start by figuring out how it knows about ~/lib/R/library?

| Otherwise, is there a recommended approach for doing run-time configuration
| of the library? I
| tried.R.parseEvalQ(".libPaths('~/R/x86_64-pc-linux-gnu-library/4.0')") but
| that does not seem to work.

That should work too.

| Thanks for any help/ideas

An MCVE may help. RInside ships with 1 1/2 dozen examples just in its
examples/standard directory and has eight more specialised examples


https://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the Rcpp-devel mailing list