Companion to Analyzing Baseball Data with R.
Official book page: http://www.crcpress.com/product/isbn/9781466570221 Book's blog: http://baseballwithr.wordpress.com/
In order to have a working copy of the code in the book, download the zip file of this repository and extract the content of the zip file in a folder of your convenience.
The data folder contains datasets used in the book, except those downloadable from websites. In order to get the missing datasets, read the readme.txt files stored inside the lahman, sqldumps and wizardry subfolders of the data folder.
The script folder contains one script named _setWorkingDir.R. Before running any code, open that file, change the path to reflect the folder of your installed files and run it.