Execute R code online

Use RPubs to publish R code

If the data is public and you want to show off your R skills you can use rpubs directly
You'll need to install the knitr package (v0.5 or later), there is a mini-tutorial just after registration

Use RStudio Cloud to publish private code.

There is a 'Cloud' version of RStudio, perfect for a quick demo. For more serious work, there is some dedicated plans.
Create an account here https://rstudio.cloud/

Use GoogleColab for collaborative work

This is a little-known option but it's possible to use R inside GoogleColab
Start rmagic by executing this in a cell:
1
%load_ext rpy2.ipython
Copied!
Then start your script by %%R to execute
1
%%R
2
3
x <- 1:10
4
5
x
6
# it should display number from 1 to 10
Copied!

Native R on GoogleColab

there is an undocumented feature that allows running R code natively more info here https://youtu.be/huAWa0bqxtA
I wouldn't rely on it, as it might disappear

Execute R code on GitHub

Last modified 8mo ago