Some interesting possibilities:
Preferred solution: GNURoot
1. Install the .apk of GNURoot in your Android device.
2. Following the instructions, download and install a linux distribution to run. Chose the .apk GNURoot Wheezy (a Debian Wheezy distro without Xterms).
3. Once installed, just follow the instructions to launch the Rootfs (Wheezy) as Fake Root. You will see a bash prompt, from which you can access a complete linux directory tree. This is the same as if you were in a computer (however, if you aren't root you won't be able to access the directories via your file browser from Android)
4. Now, we just have to update and upgrade:
apt-get update apt-get upgrade
5. Then, update the sources.list file. We don't have any graphic text editor (like gedit or kate)… but we have nano!:
nano /etc/apt/sources.list
Using the volume up + “W/S/A/D” you can move between the lines. Following instructions from CRAN, I added the following line to sources.list:
deb http://<favorite-cran-mirror>/bin/linux/debian wheezy-cran3/
Exit saving changes. But before “update and upgrade” again, don't forget to add the key for the repository running the following:
apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480
5. Update and upgrade…. voilà!
apt-get update apt-get upgrade
6. Now, you only have to run R just like in any bash console:
One problem of this method is that you only have a prompt, without any graphical interface. ¿How do I make and see plots here?. Fortunately, there's a lot of options for printing R graphs in various formats, with the inconvenient that you have to browse to the plot's location in Android.
Here I leave a small script to begin playing with R on Android. Hope you enjoy it!
script hidden here!