bref_team_results function

Scrape Team Results

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)

Arguments

  • 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

Returns a tibble of MLB team results and the following columns:

col_nametypes
Gmnumeric
Datecharacter
Tmcharacter
H_Acharacter
Oppcharacter
Resultcharacter
Rnumeric
RAnumeric
Inncharacter
Recordcharacter
Ranknumeric
GBcharacter
Wincharacter
Losscharacter
Savecharacter
Timecharacter
D/Ncharacter
Attendancenumeric
cLInumeric
Streaknumeric
Orig_Scheduledcharacter
Yearnumeric

Examples

try(bref_team_results("NYM", 2015)) try(bref_team_results(Tm="TBR", year=2008))