R kernel in Jupyter notebook 3

[This article was first published on YGC » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I followed the post, Installing an R kernel for IPython/jupyter notebook 3 on OSX, to install jupyter with python3 and R kernels in my iMac.

I have elementaryOS on my Macbook Pro and also want to have jupyter on it. The installation process is quite similar.

Install Jupyter

1
2
sudo apt-get install python3-pip
sudo pip3 install jupyter

Then we can use the following command to start jupyter:

1
ipython notebook

Install IRkernel

To compile IRkernel, we should firstly have zmq lib installed.

1
sudo apt-get install libzmq3-dev python-zmq

In R, run the following command to install IRkernel:

?View Code RSPLUS
1
2
3
4
5
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
                  repos = c('http://irkernel.github.io/',     
                  getOption('repos')),
                  type = 'source')
IRkernel::installspec()

Now we can use R in jupyter. Inline image is a great feature especially for demonstration.

With many phylogenetic packages available in R and my package ggtree, R in jupyter can be a great environment for phylogenetics.

Related Posts

To leave a comment for the author, please follow the link and comment on their blog: YGC » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)