Created
July 7, 2014 19:10
-
-
Save cpsievert/2816efc62b0a62f4f9ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devtools::install_github("cpsievert/pitchRx") | |
library(pitchRx) | |
# All game IDs that do not contain "mlb" are included in nonMLBgids | |
# In order to grab non-MLB games, you *have to* use these IDs | |
data(nonMLBgids) | |
# Grab IDs for triple A games on June 1st, 2011 | |
# This post explains more about obtaining game IDs with regular expressions -- | |
# http://baseballwithr.wordpress.com/2014/06/30/pitchrx-meet-openwar-4/ | |
aaa <- nonMLBgids[grepl("2011_06_01_[a-z]{3}aaa_[a-z]{3}aaa", nonMLBgids)] | |
dat <- scrape(game.ids = aaa) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment