This function allows you to scrape each team's payroll from Spotrac.
sptrc_league_payrolls(year = most_recent_mlb_season())
A data frame of contract data.
col_name | types |
year | character |
team | character |
team_abbr | character |
rank | numeric |
win_percent | numeric |
roster | numeric |
active_man_payroll | numeric |
injured_reserve | numeric |
retained | numeric |
buried | numeric |
suspended | numeric |
yearly_total_payroll | numeric |
Year to load
# \donttest{
try(sptrc_league_payrolls(year = most_recent_mlb_season()))
# }
Run the code above in your browser using DataLab