Blog Archives

Modern Applied Statistics in R’lyeh

June 30, 2014
By
Modern Applied Statistics in R’lyeh

So you've probably heard of King James Programming; if not, you should check it out because it's great. A quick summary is that someone took the King James Bible and Sussman's Structure and Interpretation of Computer Programs (SICP) and used an n-gram babbler to generate new sentences that combine the texts in amusing ways. The generator itself is a...

Read more »

Searching an R Function’s Source Code

May 1, 2014
By

This is not nearly as interesting as it might first sound, but every function in R contains R code; this is true of core R code as well as extension packages. Sometimes the R code is just a very shallow wrapper around some compiled code, such as in sum() and is.null(). Other times, as in lm.fit(), there is a...

Read more »

How to Make a Bad Password with R

February 24, 2014
By
How to Make a Bad Password with R

I have a lot of projects that will take ages to finish (some are in such poor shape that I tuck them away in private repositories, so no one can see my shame).  So sometimes it's nice to just take a weekend and crank out something start to finish, even if it's dumb and no one cares about it...

Read more »

Rules for Naming Objects in R

December 16, 2013
By

Naming Rules in R How are objects allowed to be named in R? As it turns out, this is a very different question from how should objects be named. This isn't about style conventions, camelCase, dots.verus_underscores, or anything like that; this is about what is strictly possible. I do a lot of outreach to HPC people who are starting...

Read more »

Intentionally Writing Obtuse Code

December 9, 2013
By

Sometimes intentionally writing bad code can be a lot of fun. Now here, when I say "bad", I mean something that's functional but completely incoherent to anything but the machine. There are even competitions for this kind of thing, but I only consider myself a dabbler in this dark art. Thankfully, it's often pretty easy to make obtuse code...

Read more »

pbdR Updates – Distributed lm.fit() and More

December 3, 2012
By

Over the weekend, we updated all of the pbdR packages currently available on the CRAN.  The updates include tons of internal housecleaning as well as many new features. Notably, pbdBASE_0.1-1 and pbdDMAT_0.1-1 were released, which contain lm.fit() methods.  This function in particular has been available at my github for over a month, but didn't make its way to the...

Read more »

R at 12,000 Cores

October 16, 2012
By

I am very happy to introduce a new set of packages that has just hit the CRAN. We are calling it the Programming with Big Data in R Project, or pbdR for short (or as I like to jokingly refer to it, 'pretty bad for dyslexics'). You can find out more about the pbdR project at http://r-pbd.org/ The packages are...

Read more »

Some Quirks of the R Language

August 14, 2012
By

R is my favorite programming language.  It's just so useful for getting work done.  Sometimes people will complain that R is a difficult language.  To me, this begs the questions:  difficult for what?  And for whom?  I personally think R is just about the easiest thing in the world for prototyping.  Meaning if you want to quickly crank out...

Read more »

Autoplot: Graphical Methods with ggplot2

June 11, 2012
By
Autoplot:  Graphical Methods with ggplot2

Background As of ggplot2 0.9.0 released in March 2012, there is a new generic function autoplot.  This uses R's S3 methods (which is essentially oop for babies) to let you have some simple overloading of functions.  I'm not going to get deep into oop, because honestly we don't need to. The idea is very simple.  If I say "I'm...

Read more »

Visualizing the CRAN: Graphing Package Dependencies

May 17, 2012
By
Visualizing the CRAN:  Graphing Package Dependencies

I had been meaning to start toying with the igraph package for a while. So a few weeks ago (lay off, I'm busy), I decided to grab a bunch of CRAN data about package dependencies. The easiest way that I could think to get this information was to just grab the html files for all the package descriptions and...

Read more »