#Collect PITCHf/x data for May 1st, 2012
dat <- scrapeFX(start = "2012-05-01", end = "2012-05-01")
#Join tables for data analysis
pitches <- plyr::join(dat$pitch, dat$atbat, by = c("num", "url"), type = "inner")
Algorithm for obtaining all available PITCHfx data**
# (1) Collect PITCHfx data from 2012
data12 <- scrapeFX(start="2012-01-01", end="2013-01-01")
# (2) Write data12$pitch and data12$atbat to a database
# (3) Remove 2012 data from working space
rm(data12)
# (4) Repeat (1)-(3) for 2011, 2010, 2009 & 2008Run the code above in your browser using DataLab