Get R and R Packages
How to get and install R, and add extra features through R packages.
R is a language and environment for statistical computing and graphics, but it’s even more than that. R is a mature open source software project with support from many developers, an interpreted functional language, and an extensible system for data analysis. A large community of contributors has written libraries of functions for R, called packages.
I like to use R to examine baseball statistics because R is very intuitive. A fan can easily calculate formulas without doing any programming. For example, calculating the earned run average (ERA) for a few hundred pitchers is as easy as typing ERA <- ER/IP.
We will use R for a few tasks that are difficult (almost impossible) to perform with just a relational database or a spreadsheet, such as building statistical models and creating sophisticated plots and graphs (one of R’s key strengths).
You can download R executables from the project’s main web site, http://www.r-project.org. You probably should pick a web site that’s kind of close to you, but it doesn’t actually matter all that much.
The mirror sites offer precompiled binaries for Windows, Mac OS X, and Linux, and they include source code. I recommend downloading the precompiled binaries if you can; modifying the R source code is beyond the scope of this book. There’s really no point in walking you through the installation on Windows. As with MySQL, R has a very slick installation wizard that ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access