eod
eod

Reputation: 483

How to tell Anaconda to use system's RStudio?

I have R/RStudio installed on both my computers (mac 10.14 and Ubuntu 18.04). In addition, I have installed r-essentials via conda (I prefer working in Jupyter Notebook/Lab over RStudio). The problem that I am facing is that sometimes I can not install R libraries via conda (for example, rgdal installs and runs smoothly on RStudio, but no way on Anaconda, i.e. after 3 weeks of trying to install rgdal with conda I'm still getting "kernel restarting"). This prevents me to use Jupyter Labs in projects where I have short deadlines.

My idea is to tell anaconda-navigator to use RStudio's version of R, and not the one provided by conda/r-essential. I tried to simply copy-paste Renviron file but that didn't work. Any idea how can I accomplish my goal?

Anaconda-navigator uses R version 3.4.3, whereas RStudio uses version 3.5.1

Thank you in advance

Upvotes: 3

Views: 2960

Answers (1)

eod
eod

Reputation: 483

Maybe I didn't get an answer because it was too easy. Anyhow, if anyone finds it useful go to https://irkernel.github.io/installation/. Here, I will give short instruction that worked in my case:

  1. Install Anaconda.
  2. Install R in terminal (not Anaconda version).
  3. Open terminal (don't do it from R console)
  4. type: R and hit the enter key (or return key on Mac).
  5. Install IRkernel by typing: install.packages('IRkernel').
  6. If IRkernel is installed then type: IRkernel::installspec() and hit the enter key.

rgdal now works from Jupyter notebook

Upvotes: 3

Related Questions