Literate Programming with R

Since I’ve been writing about literate programming lately, here’s a nice talk by Don Knuth on Literate Programming in R. Knuth begins his talk with an overview of several books that have been written using literate programming and discussing why it’s a win for the reader.

One of the things that many of the authors of those books said is that it’s much harder to write a literate program that it is to write a book or write a program. Knuth disagrees. He says that some of the really hard programs he’s written would have been impossible if he had tried just writing conventional program.

The second half of the talk considers using literate programming techniques to write R programs. Knuth says it’s a bit different (from, say, C) because R is such a high level language. Nevertheless, literate programming works well in the domain too as he demonstrates with a small paper on the Kolmogorov-Smirnov statistic written using literate programming. If you’re interested in the details, Knuth has posted a (corrected) copy of the paper. The slides are also available.

This entry was posted in Programming and tagged . Bookmark the permalink.