Install
On Archlinux
$ sudo pacman -Syu r
$ yaourt -S rstudio-desktop-bin
Usage
In REPL
$ R
> ints = 1:100
> doubleInts = sapply(ints, function(x) 2*x)
> head(doubleInts)
[1] 2 4 6 8 10 12
> quit()
Run R Script
$ cat r-ex
ints = 1:100
doubleInts = sapply(ints, function(x) 2*x)
head(doubleInts)
$ Rscript r-ex
[1] 2 4 6 8 10 12
Run with RStudio
Start RStudio with rstudio-bin
, then input commands like in normal REPL.