The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Import Retrosheet data as a structured R object
retrosheet
is an R package that downloads and parses the single-season event, gamelog, roster, and schedule files from retrosheet.org into structured R objects for further analysis.
Note: As of retrosheet 1.1.0, this repo contains the version available on CRAN. Older versions can be found here.
retrosheet
can be installed from CRAN, or development versions installed from Github.
# Install from CRAN
install.packages("retrosheet")
# Install development version from Github
# install.packages("devtools")
devtools::install_github("colindouglas/retrosheet")
getRetrosheet()
- This workhorse function returns the full seasonal data associated with the user-entered arguments
cache
argument to save a local cache and avoid stressing retrosheet.orgget_retrosheet()
as a drop-in replacement to return tibbles instead of matricesgetPartialGamelog()
- An alternative to returning the full gamelog files. This function allows the user to choose the columns and date. Column names are made available by the global object gamelogFields
Also included are convenience functions
getFileNames()
- for obtaining a list of all zip files currently available for use by this packagegetTeamIDs()
- for providing the team ID value to be used in the team
argument of getRetrosheet()
getParkIDs()
- for ballpark ID and name informationThese binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.