Quantcast
Browsing all 46 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Adding metadata to variables

There are only really two ways to preserve your statistical analyses. You either save the variables that you create, or you save the code that you used to create them. In general the latter is much...

View Article


Image may be NSFW.
Clik here to view.

Exploring the functions in a package

Sometimes it can be useful to list all the functions inside a package. This is done in the same way that you would list variables in your workspace. That is, using ls. The syntax is ls(pos =...

View Article


Image may be NSFW.
Clik here to view.

Viewing the internals of MATLAB Matrices

A cool undocumented trick I just learnt from The MathWorks’ Bob Gilmore. If you type Then printing any vector reveals information about its internal representation. For example: The structure address...

View Article

Image may be NSFW.
Clik here to view.

R hits 10000 questions on stackoverflow

A milestone, though not that exciting as questions go. Still, if you haven’t yet joined the cult of Stack Exchange, take a look here. Tagged: r, stackoverflow

View Article

Image may be NSFW.
Clik here to view.

GUI building in R: gWidgets vs Deducer

I’ve been a user (and fan) of gWidgets for a couple of years now for GUI building in R. (See my introduction to it here.) However, it’s always good to check out the competition so I’ve been playing...

View Article


Image may be NSFW.
Clik here to view.

Radical Statistics was radical

Today I went to the Radical Statistics conference in London. RadStats was originally a sort of left wing revolutionary group for statisticians, but these days the emphasis is on exposing dubious...

View Article

Image may be NSFW.
Clik here to view.

Benford’s Law and fraud in the Russian election

Earlier today Ben Goldacre posted about using Benford’s Law to try and detect fraud in the Russian elections. Read that now, or the rest of this post won’t make sense. This is a loose R translation of...

View Article

Image may be NSFW.
Clik here to view.

Be assertive!

assertive, my new package for writing robust code, is now on CRAN. It consists of lots of is functions for checking variables, and corresponding assert functions that throw an error if the condition...

View Article


Image may be NSFW.
Clik here to view.

How long does it take to get pregnant?

My girlfriend’s biological clock is ticking, and so we’ve started trying to spawn. Since I’m impatient, that has naturally lead to questions like “how long will it take?”. If I were to believe...

View Article


Image may be NSFW.
Clik here to view.

Look ma! No typing! Autorunning code on R startup

Regular readers may know that I often make R-based GUIs. They’re great for giving non-technical users safe and easy access to statistical models. The safety comes from the restrictions of a GUI: you...

View Article

Image may be NSFW.
Clik here to view.

Make your data famous!

I’m writing a book on R for O’Reilly, and I need interesting datasets for the examples. Any data that you provide will get you a mention in the book and in the publicity material, so it’s a great...

View Article

Image may be NSFW.
Clik here to view.

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

View Article

Image may be NSFW.
Clik here to view.

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

View Article


Image may be NSFW.
Clik here to view.

A little Christmas Present for you

Here’s an excerpt from my chapter “Blood, sweat and urine” from The Bad Data Handbook. Have a lovely Christmas! I spent six years working in the statistical modeling team at the UK’s Health and...

View Article

Image may be NSFW.
Clik here to view.

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

View Article


Image may be NSFW.
Clik here to view.

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

View Article

Image may be NSFW.
Clik here to view.

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

View Article


Image may be NSFW.
Clik here to view.

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,...

View Article

Image may be NSFW.
Clik here to view.

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

View Article

Image may be NSFW.
Clik here to view.

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: whos <- data.frame( doctor = c( "William...

View Article
Browsing all 46 articles
Browse latest View live