Articles by richierocks

Friday Function: setInternet2

April 15, 2011 | richierocks

Corporate IT networks are a pain for programmers. Ideally, when programming, you want the freedom to download, install and run any software that you want. Unfortunately, in the interests of security, many programmers find themselves a little restricted at the office. (I’m sure that many network admins will protest ... [Read more...]

Legendary Plots

March 12, 2011 | richierocks

I was recently pointed in the direction of a thermal comfort model by the engineering company Arup (p27–28 of this pdf). Figure 3 at the top of p28 caught my attention. It’s mostly a nice graph; there’s not too much junk in it. One thing that struck me was ... [Read more...]

Bad kitty!

January 20, 2011 | richierocks

The cat function bugs me a little. There are two quirks in particular that I find irritating on occasions that I use it. Firstly, almost everything that I want displayed onscreen, I want on its own line. __ cat("cat messes up my command prompt position") cat messes up my command ... [Read more...]

When 1 * x != x

January 16, 2011 | richierocks

Trying to dimly recall things from my maths degree, it seems that in most contexts the whole point of the number one is that it is a multiplicative identity. That is, for any x in your set, 1 * x is equal to x. It turns out that when you move to ... [Read more...]

Introducing the Lowry Plot

January 11, 2011 | richierocks

Here at the Health and Safety Laboratory* we’re big fans of physiologically-based pharmacokinetic (PBPK) models (say that 10 times fast) for predicting concentrations of chemicals around your body based upon an exposure. These models take the form of a big system of ODEs. Because they contain many equations and consequently ...
[Read more...]

Pareto plot party!

December 5, 2010 | richierocks

A Pareto plot is an enhanced bar chart. It comes in useful for deciding which bars in your bar chart are important. To see this, take a look at some made up DVD sales data. set.seed(1234) dvd_names [Read more...]

Presenting Immer’s barley data

October 31, 2010 | richierocks

Last time I talked about adapting graphs for presentations.  This time I’m putting some of the concepts I discussed there into action, with a presentation of Immer’s barley dataset.  This is a classic dataset, originally published in 1934; in 1993 Bill Cleveland mentioned it in his book Visualising Data on ...
[Read more...]

Adapting graphs for presentations

October 28, 2010 | richierocks

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 ...
[Read more...]

Trading secrets

October 20, 2010 | richierocks

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 ...
[Read more...]

Creating GUIs in R with gWidgets

October 6, 2010 | richierocks

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, ...
[Read more...]

Visualising questionnaires

September 25, 2010 | richierocks

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 | richierocks

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 ... [Read more...]

Preventing argument use in R

September 12, 2010 | richierocks

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 | richierocks

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 ... [Read more...]

Sweet bar chart o’ mine

August 30, 2010 | richierocks

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 ... [Read more...]

Oh (de)bugger!

August 26, 2010 | richierocks

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 ... [Read more...]
1 2 3 4

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)