Petti: A short introduction to using R packages for baseball research

From SABR member Bill Petti at The Hardball Times on September 21, 2015, with mention of SABR member Andy Andres:

If you follow me at all you’ll know that I love R — the statistical programming language. There is a bit of a learning curve, but it’s pretty minimal compared to some other languages and software programs. Best of all, it’s free and there is a massive network of contributors that are constantly building new packages that make it extremely easy to apply all sorts of techniques and functions easily to your data.

Our fearless editor, Paul Swydan, asked if I would write up what R packages I regularly use.

There are some great resources out there for learning R and for learning how to analyze baseball data with it. In fact, a few pretty smart people wrote a fantastic book on the subject, coincidentally titled Analyzing Baseball Data with R. I can’t say enough about this book as a reference, both for baseball analysis and for R. Go and buy it. What follows is in no way a substitute for that book; instead, think of this as a quick reference based on some of the tools that I regularly use (or in some cases, should probably use more).

I would also highly recommend the free, on-line edX course Sabermetrics 101. The course is run by Andy Andres and features not only an introduction to sabermetric analysis, but also SQL and R. I walked through the first version and have heard that the latest version is even better. There’s also the three-part series (parts one, two and three) Brice Russ did at TechGraphs on using R for sports stats.

Note that what follows is really meant for those just getting started with R, or who haven’t yet used R for baseball research, rather than those who are more experienced.

Read the full article here: http://www.hardballtimes.com/a-short-ish-introduction-to-using-r-for-baseball-research/



Originally published: September 21, 2015. Last Updated: September 21, 2015.