Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Notebook: Installing R packages

I have seen this question asked various times in stackoverflow, e.g the following:

error with install R packages on jupyter notebook

Error with install packages R on jupyter notebook

Install on jupyter notebook packages R

and

conda - How to install R packages that are not available in "R-essentials"?

However, the solutions offered haven't been working for me. I have tried to install the ROCR package in jupyter notebook and I get the following error:

enter image description here

Following the advice from this guide, I tried to replicate the example by installing the LDAvis package. First using conda in the ubuntu terminal as such:

conda skeleton cran ldavis

then

conda build r-ldavis/

However after doing this the package package doesn't install in jupyter, giving this instead:

I have also tried opening an R session in the terminal and installing the package there, however this doesn't help.

So in general how can I install R packages that aren't part of r-essentials, e.g. ROCR LDAvis? Probably I'm missing something very basic here, so any help would be greatly appreciated.

Thanks!

enter image description here

like image 322
steve zissou Avatar asked Nov 22 '25 17:11

steve zissou


1 Answers

try to install using a terminal instead of Jupyter environment:

conda install r-ldavis

or

conda install r-rocr

Then restart Jupyter notebook.

like image 66
Hadij Avatar answered Nov 24 '25 09:11

Hadij



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!