Overview
The Lahman database comes from www.seanlahman.com. Database files can be downloaded from the site, or using R as below.
Installing
install.packages('Lahman')
Data Sets in the Database
- AllstarFull
- Appearances
- AwardsManagers
- AwardsPlayers
- AwardsShareManagers
- AwardsSharePlayers
- Battting view
- BattingPost
- Fielding view
- FieldingOF
- FieldingPost
- HallOfFame
- Managers
- ManagersHalf
- Master
- Pitching view
- PitchingPost
- Salaries
- Schools
- SchoolsPlayers
- SeriesPost
- Teams
- TeamsFranchises
- TeamsHalf
Viewing Data
Once the package has been installed, to get access to the data, you need to load the library
library('Lahman')
Data in any of the Lahman tables can be inspected by
tail(AllstarFull,10)
Export Data
Once the package has been installed, to get access to the data, you need to load the library
write.csv(Teams, "teams.csv")