Blog Archives

Adapting graphs for presentations

October 28, 2010
By
Adapting graphs for presentations

I’ve just finished reading slide:ology by Nancy Duarte. It contains lots of advice about how to convey meaning through aesthetics. The book has a general/business presentation focus, but it got me wondering about how to apply the ideas in a scientific context.  Since graphs from a big part of most scientific talks, and since that’s

Read more »

Trading secrets

October 20, 2010
By
Trading secrets

Recently I had the opportunity to do a job swap with one of the guys in the laboratory here at HSL.  I helped out with the mass-spectrometry and James helped me with the data analysis.  Two very useful things came out of this. Firstly, it’s been very informative to see how the data I get

Read more »

Creating GUIs in R with gWidgets

October 6, 2010
By
Creating GUIs in R with gWidgets

The gWidgets framework is a way of creating graphical user interfaces in a toolkit independent way. That means that you can choose between tcl/tk, Gtk, Java or Qt underneath the bonnet. There's also a web-version based upon RApache and ExtJS. Since the code is the same in each case, you can change your mind and swap toolkits...

Read more »

Visualising questionnaires

September 25, 2010
By
Visualising questionnaires

Last week I was shown the results of a workplace happiness questionnaire. The plots were ripe for a makeover. Most obviously, the pointless 3D effect needs removing, and the colour scheme is badly chosen.

Read more »

Which functions in R base call internal code?

September 14, 2010
By
Which functions in R base call internal code?

In a recent question on Stack Overflow about speeding up group-by operations, Marek wondered which functions called .Internal code (and consequently were fast). I was surprised to see that there appears to be no built-in way to check whether or not this is the case (though is.primitive is available for primitive functions). Writing such a function is quite straight forward....

Read more »

Preventing argument use in R

September 12, 2010
By
Preventing argument use in R

It sounds silly, but sometimes you don't want to let people use some arguments of a function. The canonical example is write.csv. The function is effectively a wrapper to write.table, but using "," as the separator and "." as the decimal.

Read more »

Oh (de)bugger! Part II

September 3, 2010
By
Oh (de)bugger! Part II

In the first part of this series, I discussed some standard debugging techniques, like the use of the browser function. One of the limitations of browser is that it isn’t much help if the problem is somewhere higher up the call-stack. ... The function I’m going to show you uses sys.calls to retrieve the call stack, and sys.frames...

Read more »

Sweet bar chart o’ mine

August 30, 2010
By
Sweet bar chart o’ mine

Last week I was asked to visualise some heart rate data from an experiment. ... The standard way of displaying a time series (that is, a numeric variable that changes over time) is with a line plot. ... The experimenters, however, wanted a bar chart. I hadn't considered this use of a barchart before, so it was interesting...

Read more »

Oh (de)bugger!

August 26, 2010
By
Oh (de)bugger!

By number of questions asked, R passed MATLAB for the first time on Stack Overflow today. Thus it seems an appropriate time to write my first R-based post. This post concerns what to  do when your R-code goes pear shaped. Back in June there were a couple of very good videos on R debugging that

Read more »