Setting up an Asus Flip C302CA Chromebook for R Development

Don’t think of this as a real blog post. It is mostly a loose collection of notes that I took while getting my new Asus Flip C302CA set up with R and RStudio. I’ve had this up and running for just a few days now (and in fact wrote this post using RStudio on it) and I love it. I highly recommend.

The steps below are not really tested. So if you run into problems or I have missed something, let me know.

Steps

  1. Enter Developer Mode
    • Esc - Refresh - Power
    • Follow directions
    • Takes a while (~30 minutes)
  2. Download crouton
  3. Add crouton integration extension
  4. Create chroot
    • Open crosh - ctrl-alt-T
    • Start bash - shell
    • Intall xfce xiwi extension touch
    • sudo sh ~/Download/crouton -e -t xfce,touch,xiwi,extension - It’ll ask for a new username and password - Since we are encrypting the chroot (with -e) it will also ask for a passphrase. I’m certainly not a security expert, but don’t use the same one as your google or new chroot password… - This takes a while (~15 minutes)
  5. You should now have a working ubuntu install with the xfce desktop available. Fire that up.
    • If you don’t have shell still open, get to that (ctrl-alt-T and shell)
    • type sudo startxfce4
    • Ta-da! Linux!
  6. Now we can start installing all the tools that we need from our xfce window.
    • get to a terminal
    • Install Git
sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get install r-base r-base-dev
wget https://s3.amazonaws.com/rstudio-dailybuilds/rstudio-1.1.201-amd64.deb
sudo dpkg -i rstudio-1.1.201-amd64.deb
rm rstudio-1.1.201-amd64.deb

Some of the basics (i.e. for devtools)

sudo apt-get install libxslt-dev libcurl4-openssl-dev libssl-dev

The spatial stuff. This also adds the ubuntugis repo so that you can get the latest and greatest. The latest is at https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa

sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install libgdal-dev libproj-dev
  1. Working with RStudio on your chromebook

Not a whole lot of details here. Just some basic notes I had for myslef. First, I am using a 64GB microSD card to give myself some room and I keep all of my projects stored on this card (as well as on GitHub). I just set up a symbolic link to this from my home folder. Something like the following should do the trick.

cd 
ln -s /var/host/media/removable/SD\ Card/ projects

With this you can get to the card easier (e.g. cd ~/projects)

I am still playing around with the best way to fire up rstudio. There are two ways I am doing this. Either firing up a separate desktop and using RStudio from there or starting RStudio in its own window. I think I prefer the later, but time will tell. You already know who to fire up the desktop. You can use rstudio from a terminal or find it in your applications menu. For the RStudio in its own window, I added this:

alias rstudio="sudo startxiwi rstudio -F"

to my ~/.bashrc in the chromebook (not the chroot!) shell. Then I can fire up rstudio with ctrl-alt-T, then shell, then rstudio.

Hopefully you should now be ready to roll with R and R development on your fancy new chromebook! See below for some additional links.

Some related links