streak_data | R Documentation |
Extracts batting data from Retrosheet for a specific player and specific event
streak_data(pbpdata, pid, eventcode, AB=FALSE)
pid |
Retroid of player |
pbpdata |
Retrosheet event file for a particular season or seasons |
eventcode |
Code(s) for variable EVENT_CD that indicates event (can use "H", "HR", "SO", "OB", or sets of numeric codes) |
AB |
Should one only consider official at-bats? |
vector of 0-1 data for all plate appearances in time
Jim Albert
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.