Setting up Linux
GNURoot allows access to special keys via the
volume down buttons of your phone and some character on the virtual keyboard:
In order to make adding repositories easier via the
add-apt-repository command, execute the following
Then add a repository which hosts the wanted R package (e.g. the ‘rstudio’ one)
Finally, install R itself
Plotting in the Terminal
Plots to stdout can be done by using the txtplot package
Proper plots with ggplot2
It is of course possible to simply use
ggsave in order to save your plots.
However, in order to have a more elaborate preview, follow the next few steps.
In order to get proper plots with
ggplot2 you have to set up an X server first. This can be done by installing an android app like e.g. XServer XSDL and launching your favourite window manager into it.
Firstly start the X server, secondly your linux distro. Then introduce the two and start some window manager:
In R, you can then use ggplot2 as you normally would.
In order to see the resulting plot, switch to the X server and admire the view!