R's graphics libraries make it much, much too hard to plot two curves on top of each other. For instance. Suppose I have two vectors of numbers, X and Y, and I want probability density plots for them both. On the same chart. How do you do it? Is it something sane like
densityplot(list(X,Y))
...? Or I would tolerate the slightly less obvious but still relatively motivated
densityplot(stack(X,Y))
even (assuming that was an acceptable way to use stack, which it isn't, but that's a whole nother rant). No! It is neither! This is how you do it:
with(data.frame(aargh=c(X,Y),
gah=c(rep(1,length(X)),
rep(2,length(Y)))),
densityplot(~aargh, groups=gah))Plz to be shooting me now.
no subject
Date: 2007-05-17 05:39 am (UTC)no subject
Date: 2007-05-17 05:58 am (UTC)On balance I'd say it's closer to the Lisp attractor than the Algol attractor.
The "R" at the beginning of the post is a hyperlink, if you want more detail.