On 04 Dec 2015, at 13:16, Dirk Eddelbuettel <edd at debian.org> wrote:
On 4 December 2015 at 12:31, Thomas Lin Pedersen wrote:
| Hi
|
| While testing my package on an Amazon cloud instance using the Bioconductor AMI
| (https://www.bioconductor.org/help/bioconductor-cloud-ami/) I ran into the
| following problem I had not encountered on my work computer (A Mac OS X).
|
| I have a C++ function that makes use of functionality in the igraph package, so
| to access this I have the following in my function:
|
| Environment igraph("package:igraph");
| Function neighbors = igraph["neighbors?];
|
| This worked fine on my work machine but gave the following error when tried on
| the Amazon instance:
|
|
| Error: cannot convert to environment
|
|
| I was able to reduce the error into trying to get access to a package
| environment that is installed outside the core package library. The instances
| created using the Bioconductor AMI have the following package storage
| structure:
|
|
| > .libPaths()
| [1] "/home/ubuntu/R-libs" "/usr/local/lib/R/library"
|
|
| Any package residing in usr/local/lib/R/library will be loaded into the
| environment fine, while any package in /home/ubuntu/R-libs will throw the
| error.
So maybe don't install into /home/ubuntu/R-libs ?
There are no hardcoded path in Rcpp. This strikes me as a run-time config
(and hence not an Rcpp question for this list).
Dirk