How to import conda environments to Rstudio?
1
0
Entering edit mode
2.3 years ago

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

enter image description here

Is there a way to call the package installed under conda?

Thanks for your time! :)

Estudio conda • 1.8k views
ADD COMMENT
2
Entering edit mode
2.3 years ago
LChart 4.5k

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.

ADD COMMENT

Login before adding your answer.

Traffic: 1707 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6