Publications by flodel

The 50 most used R packages

05.04.2012

Ask anyone what makes R a great language, one argument that often comes back is its very active community. Proof is the impressive number of packages contributed by developers from all horizons and backgrounds. The CRAN website alone lists 3,725 packages but are they all reliable or even useful? Certainly not.The crantastic.org website is a grea...

2516 sym 4 img

A gallery view for Craigslist

01.05.2012

As much as I love Craigslist, I sometimes find the interface a bit limited. My biggest wish? That there was an option for showing the search results as an image gallery, like eBay has. This could prove quite useful for browsing things like antiques, furniture, art: categories where I only need a quick glance at an object’s picture and I imme...

1413 sym 4 img

Optical Art with R

16.07.2012

Last week, in a post entitled Bridget Riley exhibition in London, the author Markus Gesmann wrote an R script reproducing one of Riley’s famous art pieces: Movement in Squares.This reminded me of my own first “brush” with Op art. It was in art class years ago, our professor (Madame Vitré) had asked that we recreate an interesti...

1398 sym 16 img 1 tbl

How I cracked Troyis (the online flash game)

11.11.2012

Troyis™ is an addictive online flash game where you move a chess knight through increasingly difficult puzzles. After hours and hours of playing, sometimes late into the night, I decided I’d waste even more of my time and write a little program that can play the game on its own. The result is quite amazing — imagine Garry Kasparov riding ...

4656 sym 14 img

Search and replace: Are you tired of nested `ifelse`?

06.01.2013

It happens all the time: you have a vector of fruits and you want to replace all bananas with apples, all oranges with pineapples, and leave all the other fruits as-is, or maybe change them all to figs. The usual solution? A big old nested `ifelse`: Ok, that didn’t look too bad, especially with the code and fruits nicely aligned. But what if I...

1292 sym

R and the last comma

31.03.2013

In R, every comma matters. When creating a vector, c(1, 2, 5) will do the right thing, but add one unfortunate comma and c(1, 2, 5,) will greet you with a deadly Error in c(1, 2, 5, ) : argument 4 is empty. Other languages like Perl are less strict when defining basic data structures: having a comma after the last item is allowed. This can be par...

1733 sym