Writing Better R Code

When I teach R, I always caution the audiences about the quirks of R programming. It is very typical for someone with a background in Java or Python to write code in R that will take forever to execute (like I used to do, and sometimes still do). I warn the students about loops and encourage vectorized operations. Unfortunately, writing faster code in R is often a more involved affair. What I offer are just some easy fixes to most common issues.

Thinking of those students that may be reading my blog, I want to share a resource that I think would be helpful. If you have reached the point in your R endeavour where you feel the need to write better code take a look at Hadley Wickham’s Advanced R. Information contained in the web site is also available as a dead tree book.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: