Blog Archives

Update on improving examples in base-R

December 24, 2014
By
Update on improving examples in base-R

Last month I was ranting about the state of some of the examples in base-R, particularly the paste function. Martin Maechler has now kindly taken my suggested examples and added them into R. Hopefully this will reduce the number of newbie questions about “how do I join these strings together”. Since Martin showed some interest

Read more »

Improving base-R examples

November 25, 2014
By
Improving base-R examples

Earlier today I saw the hundred bazillionth question about how to use the paste function. My initial response was “take a look at example(paste) to see how it works”. Then I looked at example(paste), and it turns out that it’s not very good at all. There isn’t even an example of how to use the

Read more »

Regular expressions for everyone else

September 25, 2014
By
Regular expressions for everyone else

Regular expressions are an amazing tool for working with character data, but they are also painful to read and write.  Even after years of working with them, I struggle to remember the syntax for negative lookahead, or which way round the start and end anchor symbols go. Consequently, I’ve created the regex package for human

Read more »

Finally, a use for rapply

July 15, 2014
By
Finally, a use for rapply

Tagged: r, rapply, recursive, stats

Read more »

Automatically convert RUnit tests to testthat tests

May 12, 2014
By
Automatically convert RUnit tests to testthat tests

There’s a new version of my assertive package, for sanity-checking code, on its way to CRAN. The release has been delayed a while, since my previous attempt at an upload met with an error that was only generated on the CRAN machine, but not on my own. The problem lay with some code designed to

Read more »

Introducing the pathological package for manipulating paths, files and directories

April 28, 2014
By
Introducing the pathological package for manipulating paths, files and directories

I was recently hunting for a function that will strip the extension from a file – changing foo.png to foo, and so forth. I was knitting a report, and wanted to replace the file extension of the input with the extension of the the output file. (knitr handles this automatically in most cases but I

Read more »

Fearsome Engines Part 3: Which one should you use?

October 13, 2013
By
Fearsome Engines Part 3: Which one should you use?

There are lots of R engines emerging! I’ve interviewed members of each of the teams involved in these projects. In part 1 of this series, we covered the motivation of each project. Part 2 looked at the technical achievements and new features. This part tries to determine which projects are suitable for which users. Compatibility

Read more »

Fearsome Engines Part 2: Innovations and new features

October 13, 2013
By
Fearsome Engines Part 2: Innovations and new features

There are lots of R engines emerging! I’ve interviewed members of each of the teams involved in these projects. In part 1 of this series, we covered the motivation of each project. This part looks at the technical achievements and new features. Many of the innovations are performance improvements, reflecting the primary goal of several

Read more »

Webcast on Writing Great R Code

September 19, 2013
By
Webcast on Writing Great R Code

While I’m promoting things, you might also want to know that I’m doing a webcast on how to write great R code next Wednesday. It’s at 6pm British Summer Time or 10am Pacific Daylight Time. the big problem with being a data scientist is that you have to be a statistician and a programmer, which

Read more »

O’Reilly R ebooks half price – today only

September 19, 2013
By
O’Reilly R ebooks half price – today only

Including my hot-off-the-press Learning R. Buy two copies! http://oreil.ly/1eRrhP1 Tagged: book, deal, oreilly, r, special offer

Read more »