Seyed Omid Nabavi
Seyed Omid Nabavi

Reputation: 497

Where should I search for the installed R packages by conda?

I am installing r packages using conda. It works fine when I use this example format

"conda install -c r r-scales --name condaenv"

But when I want to define installtion directory using --prefix

conda install -c r r-scales --prefix=/opt/local

the package "scale" is installed but I cannot find it in the directory I expect to be

"/opt/local/lib/R/library"

. It is weird because when I try to reinstall this package it says

All requested packages already installed.

that means this package is already installed in defined path. BUT WHERE? I also try using

conda list

But I cannot find "scales" among installed packages.
UPDATE: I also tried to use install.packages("scales), but I ran into this error

/opt/anaconda/bin/x86_64-conda_cos6-linux-gnu-ld: cannot find -lm collect2: error: ld returned 1 exit status make: *** [/raid60/raid2/opt/local/lib/R/share/make/shlib.mk:6: scales.so] Error 1 ERROR: compilation failed for package ?scales? * removing ?/raid60/raid2/opt/local/lib/R/library/scales?

Upvotes: 0

Views: 2395

Answers (1)

RMS
RMS

Reputation: 467

When using environments in conda, the r packages are installed inside the environment folder.

For instance, in Linux, if you have a environment condaenv, the R packages installed with conda (or its faster cousin mamba) should be located at:

~/conda/envs/condaenv/lib/R/library/

to locate the environment folder in your system you can look at the answers provided to this question.

Upvotes: 0

Related Questions