Blog Archives

O’Reilly R ebooks half price – today only

September 19, 2013
By
O’Reilly R ebooks half price – today only

Including my hot-off-the-press Learning R. Buy two copies! http://oreil.ly/1eRrhP1 Tagged: book, deal, oreilly, r, special offer

Read more »

Fearsome Engines, Part 1

September 7, 2013
By
Fearsome Engines, Part 1

Back in June I discovered pqR, Radford Neal’s fork of R designed to improve performance. Then in July, I heard about Tibco’s TERR, a C++ rewrite of the R engine suitable for the enterprise. At this point it dawned on me that R might end up like SQL, with many different implementations of a common

Read more »

The tenure of Doctor Who incarnations

August 3, 2013
By
The tenure of Doctor Who incarnations

With a new actor being announced tomorrow, it got me pondering about the good Doctor. Specifically, who is the longest serving doctor? IMDB has the data: Let’s plot it to see how it changes over time. There was a definite shift after Tom Baker towards a shorter term as the doctor. In terms of screen

Read more »

The Secrets of Inverse Brogramming, reprise

July 27, 2013
By
The Secrets of Inverse Brogramming, reprise

Brogramming is the art of looking good while you write code. Inverse brogramming is a silly term that I’m trying to coin for the opposite, but more important, concept: the art of writing good looking code. At useR2013 I gave a talk on inverse brogramming in R – for those of you who weren’t there

Read more »

How R will turn into SQL

July 16, 2013
By
How R will turn into SQL

Up until very recently the only way of running R code was through the standard R distribution. Of course you could use another IDE, but somewhere underneath it all you would be running the same, standard R engine from the R-core team. This is no longer your only option. A couple of weeks ago Radford

Read more »

user2013: The caret tutorial

July 9, 2013
By
user2013: The caret tutorial

This afternoon I went to Max Kuhn’s tutorial on his caret package. caret stands for classification and regression (something beginning with e) trees. It provides a consistent interface to nearly 150 different models in R, in much the same way as the plyr package provides a consistent interface to the apply functions. The basic usage

Read more »

user2013: The Rcpp tutorial

July 9, 2013
By
user2013: The Rcpp tutorial

I’m at user 2013, and this morning I attended Hadley Wickham and Romain Francois’s tutorial on the Rcpp package for calling C++ code from R. I’ve spent the last eight years avoiding C++ afer having nightmares about obscure pointer bugs, so I went into the room slightly skeptical about this package. I think the most

Read more »

A brainfuck interpreter for R

April 24, 2013
By
A brainfuck interpreter for R

The deadline for my book on R is fast approaching, so naturally I’m in full procrastination mode.  So much so that I’ve spent this evening creating a brainfuck interpreter for R.  brainfuck is a very simple programming language: you get an array of 30000 bytes, an index, and just 8 eight commands.  You move the

Read more »

Have my old job!

November 14, 2012
By
Have my old job!

My old job at the Health & Safety Laboratory is being advertised, and at a higher pay grade to boot.  (Though it is still civil service pay, and thus not going to make you rich.) You’ll need to have solid mathematical modelling skills, particularly solving systems of ODEs, and be proficient at writing scientific code,

Read more »

Indexing with factors

November 8, 2012
By
Indexing with factors

This is a silly problem that bit me again recently. It’s an elementary mistake that I’ve somehow repeatedly failed to learn to avoid in eight years of R coding. Here’s an example to demonstrate. Suppose we create a data frame with a categorical column, in this case the heights of ten adults along with their

Read more »