Stats in bed, part 1: Ubuntu Touch

Round at the RSS Statistical Computing committee, we were having a chuckle at the prospect of a meeting about Stats In Bed. By which I mean analysis on mobile devices, phones and tablets (henceforth phablets), not some sort of raunchy performance indicator. This is something that has been nagging at the back of my mind for a while. Why, in this day and age, can’t we just run any software anywhere? Well, it’s because the major manufacturers have narrowed the scope for tinkering on phablets.

Although it seems silly, I know there is some time each day when I could do little useful tasks with a tablet that I can’t do with a laptop, even a very small lightweight one. One of the issues is time to start up or come out of hibernation in Windows, so I turned my attention to Linux, and in particular Ubuntu Touch.

I had just acquired a Nexus 10 tablet (comes with Android installed) for this purpose, and was also a Linux noob, so I was stumbling about as I experienced the first rays of dawn, like Bertie Wooster after a particularly libatious evening at the Drones. In this post, I’ll describe my first line of attack, which didn’t prove successful, but could be at some point in the future when the software develops further. My goal was to be able to run R, Julia and ideally Stan (therefore C++ compilation).

Ubuntu Touch is a work in progress, a new version of Ubuntu Linux designed for touch screens. Converting an operating system to work with touch screens is not a trivial job, although Ubuntu seem to have set themselves a dangerously optimistic timescale for this collective effort. A Linux smartphone has been waved around, and the USP is supposedly the goal of using the phablet on the move, then docking it in the office, where it carries on but scales the apps to work on your monitor*, keyboard and mouse. This is kind of cool, but I don’t feel a great need for it. I need a desktop that handles unpleasant computation quickly and without distracting itself, and frankly, although I groan every time my various versions of Windows grind to a halt to do… what? something obscure and, I suspect, unnecessary in the so-called background, I can’t live in the real world with other people and ditch Windows any time soon. If I was a hackathon hipster then I could, but I am somewhere in a hospital in the London suburbs, with employers and colleagues who require Windows.

* – my father-in-law actually used the term VDU the other day. I laughed, rather unfairly.

As Ubuntu Touch stands, it can be installed on a desktop for you to try apps out and contribute to the development, but installing on the phablet is rather more limited. Still, it’s not hard to do. The first step is to invalidate your warranty and root the phablet. Like all other first-timers, I had a vision of trying to sell it on for a couple of bucks after I had totally killed it, but it turns out to be much safer than that. If anything goes wrong, you can just replace the Android exactly as it came from the factory. You hold down all the buttons on the phablet together until the alarming sight appears of the little green robot on its back, with its guts opened up for some Android surgery. (I felt guilty at taking risks with the little guy.) You need a computer with Linux, you connect the phablet, and follow the (now deprecated) instructions from the link above. It’s amazingly simple. Then you have a Linux phablet, like this:


The username and password are phablet, which serves to remind you that this is a kind of preview version. And yet it works pretty well, despite some odd shadows lingering after windows have been swiped off to one side. The home screen looks like this:


and there are some other apps, none of which interested me:


But you can’t install new ones at this stage, even though it looks like you can. There is a dash search, and indeed a terminal app appears:


Which has tiny font, but whatever…


At this stage, I was getting pretty excited. From the terminal I could install R… maybe. It didn’t come with the Touch installation. It behaves like the desktop should when you issue an apt-get command to update your software, prior to installing the new R and Julia and so on.


But then fails. You see, a large part of the memory is not writeable, because this is an evaluation version. I just hope that is a temporary measure, and not yet another OS for phablets that blocks the user from poking around under the bonnet. Time will tell when (if?) the real Ubuntu Touch comes out.


So, that was an interesting diversion, but it was back to the drawing board and back to Android. One day it might be the choice to go with if you want to run R and friends on a phablet, but the small space given to the terminal wasn’t enough, and the keyboard was too chunky. Hopefully someone could write a full-screen terminal app, and a better keyboard, and hopefully the OS will allow it. Until then, you can read how I made friends with the little green Android dude in the second installment.



  1. Useful post Robert thanks.
    We are doing more and more of our R work on amazon instances these days. I suspect that I am more likely to use the tablet in that way – connecting through to an RStudio session in the cloud. Using it that way, I might well find LaTex on the tablet more useful than R.

  2. While waiting to see if Ubuntu Touch matures, you might try using Linux Deploy to run a full Linux distro inside of Android. I also have a Nexus 10 and regularly run R, IPython Notebook, and other desktop Linux apps on it in the Debian VM that I installed through Linux Deploy. It’s a little slow and being stuck only with a partition size you can fit on the Nexus without sucking up all your free space is somewhat limiting but you really can do “Stats in bed” with it.

  3. Thanks for the comments. Part 2, coming soon, will cover GNUroot and Linux Deploy, and has a happier ending than Part 1! I’ve played a little with a colleague’s Surface Pro, and it is an interesting gadget – and massively overpriced! My wife has whatever the lesser version is (Surface Amateur?) and has successfully found workarounds for most of the barriers. A lot of people laughed at the fact there’s still a desktop for when you have serious stuff to do, but I see that as a strength. We mock, but we should not underestimate Microsoft…

    1. Surface Pro need be compared with Mac Air in terms of price as it is a notebook in a tablet form factor. I have several Android and I pads, but they all seem far away from running any serious computation software natively even with Linux Deploy. By the way, I run Python, R, and Julia on a Linux VM on Surface Pro.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s