How to use R with Google Colaboratory?

korakot picture korakot · Feb 8, 2019 · Viewed 49.4k times · Source

Google Colaboratory supports Python version 2.7 and 3.6

I see an example how to use Swift in Colab a while ago.

Today, I happened to run

!jupyter-kernelspec list

And found a new kernel: IRkernel

Available kernels:
  ir         /usr/local/share/jupyter/kernels/ir
  python2    /usr/local/share/jupyter/kernels/python2
  python3    /usr/local/share/jupyter/kernels/python3
  swift      /usr/local/share/jupyter/kernels/swift

Is it now possible to use R in Colab as well? No hassle in installing R kernel?

Answer

korakot picture korakot · Feb 8, 2019

Yes.

For a new R-notebook, use this link. (shorthand is colab.to/r )

You can learn from IRkernel demos, e.g. demo.ipynb

Save a copy in your Google Drive, and make any changes you need.

2 more demos:

See more details in IRkernel Github.