Add R code

No idea right now how to integrate this. R graphics don't really play
that nice.