Did you know you can use "
I was interested to read C. Titus Brown‘s recent post, “Is version control an electronic lab notebook?” I think version control is really important, and I think all computational scientists should have something equivalent to a lab notebook. But I think of version control as serving needs orthogonal to those served by a lab notebook.
The other day, there was a bit of a twitter conversation about qqline in R. It made me think: how exactly is the line produced by qqline chosen? I seemed to recall that the line was through the first and third quartiles. An advantage of R is that you can just type the name of
Matt Maenner asked about the sawtooth pattern in the figure in my last post on Chutes & Ladders. Damn you, Matt! I thought I was done with this. Don’t feed my obsession. My response was that if the game ends early, it’s even more likely that it’ll be the kid who went first who won.
I was playing Chutes & Ladders with my four-year-old daughter yesterday, and I thought, “How long is this going to take?” I saw an interesting mathematical analysis of the game a few years ago, but it seems to be offline, though you can read it via the wayback machine. But that didn’t answer my specific
Stack Exchange is a series of question-and-answer sites, including Stack Overflow for programming and Cross Validated for statistics. I was introduced to these sites at a short talk by Barry Rowlingson at the 2011 UseR! meeting, “Why R-help must die!“ These sites have a lot of advantages over R-help: The format is easier to read,
If you’re not using version control, you should be. Learn git. If you’re not on github, you should be. That’s real open source. To help some colleagues get started with git and github, I wrote a minimal tutorial. There are lots of git and github resources available, but I thought I’d give just the bare
Another R tip: beware of as.character applied to a list. Really, beware of grep with a list: You might have thought that the result would be just 1, but grep expects a vector of character strings. If the input is not that, it uses as.character(). Since the result of that starts with "c(", grep finds
It’s widely understood that, in R programming, one should avoid for loops and always try to use apply-type functions. But this isn’t entirely true. It may have been true for Splus, back in the day: As I recall, that had to do with the entire environment from each iteration being retained in memory. Here’s a
An R tip: Did you know that x] is the same as x]]? I should make more thorough use of this. In the help file for ] is equivalent to alist]...] providing all but