cpsievert / pitchRx

Tools for scraping MLB Gameday data and Visualizing PITCHf/x
http://cpsievert.github.io/pitchRx/
Other
124 stars 33 forks source link

Determine batter info per pitch. #43

Open jrbattles opened 8 years ago

jrbattles commented 8 years ago

I know I can subset and merge atbat information with pitch info to get pitch f/x variables per atbat.

subTroutAtBats <- subset(dat[["atbat"]], batter_name == "Mike Trout")
subTroutCombo <- merge(subTroutAtBats, dat[["pitch"]], by= "play_guid")

... but how can I see who the pitchers and batters are for each pitch event?