Beforehand, I assume the followings were done.
- Install Anaconda 3.6
- Install R 3.3, RGui, and RStudio, etc.
Don’t Try This
conda update anaconda
conda install -c r r-essentials
There are web pages that teach you install this way.
This will duplicate your libraries in the R evnironment. And the R kernel cannot start in Jupyter Notebook.
Install with IRkernel
In RGui or RStudio, run the followings:
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
This is important
Check you R library path in RGui or RStudio
.libPaths()
In my case, this output:
[1] "C:/Users/Ken Chan/Documents/R/win-library/3.3"
[2] "C:/Program Files/R/R-3.3.3/library"
Copy the first path. In command line or bash console, create an environment variable.
export R_LIBS_PATH="C:/Users/Ken Chan/Documents/R/win-library/3.3"
Start the console with R --no-save
, and run:
IRkernel::installspec()
You are Done!
Where you restart your Jupyter Notebook, you can see a new R kernel, under the menu Kernel
-> Change kernel
.
Written with StackEdit.
No comments:
Post a Comment