hello I installed an R package called Spiec-Easi for co occurrence networks analysis.
The problem is that I only could install the program via conda under the "base" conda environment and the program was installed as "r-spieceasi".
Now when I import the library with library("SpiecEasi") I get the following error:
Error in library("SpiecEasi") : there is no package called ‘SpiecEasi
As I have the program installed via conda, how do I call to the package in a rstudio session?
when I run conda list the package appears installed under the "base" conda environment
Is there a way to call the package installed under conda?
Thanks for your time! :)
1 answer
In order to use that package, you'll need to configure R-studio to 'point' to the version of R under your base environment. If you're running on a version of linux, it should be as easy as setting:
export RSTUDIO_WHICH_R=/path/to/anaconda/envs/base/bin/R
prior to launching Rstudio. You may also need to set your .libPaths to point to the appropriate subdirectory in anaconda/envs/base.
Log in to answer this question.