Scrape Team Results
This function allows you to scrape schedule and results for a major league team from Baseball-Reference.com
bref_team_results(Tm, year)
Tm
: The abbreviation used by Baseball-Reference.com for the team whose results you want to scrape.year
: Season for which you want to scrape the park factors.Returns a tibble of MLB team results and the following columns:
col_name | types |
Gm | numeric |
Date | character |
Tm | character |
H_A | character |
Opp | character |
Result | character |
R | numeric |
RA | numeric |
Inn | character |
Record | character |
Rank | numeric |
GB | character |
Win | character |
Loss | character |
Save | character |
Time | character |
D/N | character |
Attendance | numeric |
cLI | numeric |
Streak | numeric |
Orig_Scheduled | character |
Year | numeric |
try(bref_team_results("NYM", 2015)) try(bref_team_results(Tm="TBR", year=2008))
Useful links