Learn R Programming

baseballr (version 1.6.0)

sptrc_league_payrolls: Scrape League Payroll Breakdowns from Spotrac

Description

This function allows you to scrape each team's payroll from Spotrac.

Usage

sptrc_league_payrolls(year = most_recent_mlb_season())

Value

A data frame of contract data.

col_nametypes
yearcharacter
teamcharacter
team_abbrcharacter
ranknumeric
win_percentnumeric
rosternumeric
active_man_payrollnumeric
injured_reservenumeric
retainednumeric
buriednumeric
suspendednumeric
yearly_total_payrollnumeric

Arguments

year

Year to load

Examples

Run this code
# \donttest{
  try(sptrc_league_payrolls(year = most_recent_mlb_season()))
# }

Run the code above in your browser using DataLab