The Art of R Programming

Here are my first impressions of The Art of R Programming (ISBN 1593273843). I haven’t had time to read it thoroughly, and I doubt I will any time soon. Rather than sitting on it, I wanted to get something out quickly. I may say more about the book later.

The book’s author, Norman Matloff, began his career as a statistics professor and later moved into computer science. That may explain why his book seems to be more programmer-friendly than other books I’ve seen on R.

My impression is that few people actually sit down and learn R the way they’d learn, say, Java. Most learn R in the context of learning statistics. Here’s a statistical chore, and here’s a snippet of R to carry it out. Books on R tend to follow that pattern, organized more by statistical task than by language feature. That serves statisticians well, but it’s daunting to outsiders.

Matloff’s book is organized more like a typical programming book and may be more accessible to a programmer needing to learn R. He explains some things that might require no explanation if you were learning R in the context of a statistics class.

The last four chapters would be interesting even for an experienced R programmer:

  • Debugging
  • Performance enhancement: memory and speed
  • Interfacing R to other languages
  • Parallel R

No one would be surprised to see the same chapters in a Java textbook if you replaced “R” with “Java” in the titles. But these topics are not typical in a book on R. They wouldn’t come up in a statistics class because they don’t provide any statistical functionality per se. As long as you don’t make mistakes, don’t care how long your code takes to run, and don’t need to interact with anything else, these chapters are unnecessary. But of course these chapters are quite necessary in practice.

As I mentioned up front, I haven’t read the book carefully. So I’m going out on a limb a little here, but I think this may be the book I’d recommend for someone wanting to learn R, especially for someone with more experience in programming than statistics.

Related post: R: The Good Parts

How has math changed your view of the world?

Several people have asked me whether studying math changed my view of the world, and if so how.

I see applications of math everywhere. But more fundamentally, studying math has led me to believe that complex problems sometimes have simple solutions.

Simple solutions may be hard or impossible to find. But you’re more likely to find a simple solution if you believe it exists because you’ll keep looking longer.

Related posts

Demonstrating persistence

“A college degree shows you can finish something.” I’ve heard this forever, but I don’t believe it. Of course a college degree shows that someone finished one thing, namely a college degree. But I don’t think that’s the best predictor of whether someone will finish something else.

College provides a great deal of support: accountability, frequent feedback, a community of peers, etc. Succeeding in this environment is an accomplishment, but it doesn’t necessarily demonstrate that someone can succeed in a less supportive environment. It also doesn’t necessarily indicate that someone can focus on a project that takes more than a semester to finish.

Here are a few things that might be better indicators of initiative and persistence.

  • Learning a foreign language as an adult
  • Losing 50 pounds
  • Learning to play the oboe
  • Quitting smoking
  • Reading Churchill’s history of WWII
  • Starting a business
  • Running a marathon
  • Writing a book

Employers that use college degrees as their only filter on applicants are missing out. An ideal candidate would have a college degree and some proof of independent achievement. But given a choice between someone with only academic credentials and someone with only independent accomplishments, the latter may be a better hire.

Related post: Picking classes

How to neutralize intelligence

Kurt Vonnegut’s short story Harrison Bergeron begins “The year was 2081, and everybody was finally equal.” Beautiful people are required to wear ugly masks, strong people are required to carry weights, etc. Every excellence is handicapped.

But how do you handicap intelligence? With interruptions. In Vonnegut’s story, those deemed too intelligent are required to wear a device in their ear that regularly interrupts their thoughts with a loud noise.

Related posts