Blog Archives

Presentation on Building R Packages

February 21, 2011
By

Last week I gave a presentation to the Melbourne R User Group on Building R Packages. The talk covered a simple package example, and an example of interfacing R with native code. The slides are here: RPackages.pdf. The R community in Melbourne (and Aus...

Read more »

Gdb Macros for R

September 6, 2010
By

When debugging R interactively, one hurdle to navigate is unwrapping SEXP objects to get at the inner data. Gdb has some useful macro functionality that allows you to wrap useful command sequences in reusable chunks. I recently put together the followi...

Read more »

Project Euler Problem #21

August 16, 2010
By

This is a solution for problem 21 on the Project Euler website. It consists of finding the sum of all the amicable numbers under 10000. This was pretty easy to solve, but the solution could probably be improved quite a bit. Solution #1 in R is as follo...

Read more »

Headless R / X11 and Cygwin/X

August 17, 2009
By

Running R on a Linux server in headless mode (i.e. producing graphics without XWindows running) can be tricky. Some people recommend using a virtual X framebuffer. However, I’ve found that the best approach (at least im my opinion) is to use the ...

Read more »

London UseR Group Talk – Slides

April 1, 2009
By

The inaugural London UseR event was a great success, with a lot of interesting people and a very constructive networking atmosphere! I gave a (slightly disjointed) talk on concurrency and the bigmemory package in R (more on that later this year at UseR...

Read more »

R User Group Meeting, London

March 5, 2009
By

On Tuesday March 31st, Mango Solutions are sponsoring the inaugural London R User Group Meeting. It will be a great opportunity to meet other R users and find out how people are using it. As the first one of its kind in London, I would expect a high le...

Read more »

Project Euler Problem #28

March 2, 2009
By

Problem 28 on the Project Euler website asks what is the sum of both diagonals in a 1001×1001 clockwise spiral. This was an interesting one: the relationship between the numbers on the diagonals is easy to deduce, but expressing it succinctly in R...

Read more »

Project Euler Problem #22

March 1, 2009
By

Problem 22 on Project Euler proves a text file containing a large number of comma-delimited names and asks us to calculate the numeric sum of the alphabetical score for each name multiplied by the name’s position in the original list. This is mad...

Read more »

Project Euler Problem #15

February 22, 2009
By

Problem 15 on Project Euler asks us to find the number of distinct routes between the top left and bottom right corners in a 20×20 grid, with no backtracking allowed. I originally saw this type of problem tackled in the book Notes On Introductory ...

Read more »

Project Euler Problem #13

February 21, 2009
By

Problem 13 on Project Euler asks us to sum 100 50-digit numbers and give the first 10 digits of the result. This is pretty easy. Note we are using R’s integer division operator %/% to discard the remainder of the large summed integer and just giv...

Read more »