hoopshype_salaries: Hoopshype teams players salaries

View source: R/hoops_hype_functions.R

hoopshype_salariesR Documentation

Hoopshype teams players salaries

Description

Detailed salaries for each player and team from hoopshype

Usage

hoopshype_salaries(
  teams = NULL,
  all_teams = TRUE,
  assume_player_opt_out = T,
  assume_team_doesnt_exercise = T,
  nest_data = F,
  return_message = TRUE
)

Arguments

teams

vector of team names

all_teams

if TRUE returns all teams

assume_player_opt_out

if TRUE assumes player opt out of options

assume_team_doesnt_exercise

if TRUE assumes teams don't exercise options

nest_data

if TRUE nests data

return_message

if TRUE returns a message

Value

a 'tibble'

See Also

Other hoopshype: hoops_hype_salary_summary()

Other salaries: bref_bios(), hoops_hype_salary_summary(), nba_insider_salaries()

Examples

library(dplyr)
df_salaries <-
hoopshype_salaries(all_teams = TRUE,
 nest_data = F, return_message = T)
 ## By Expiring Salary Type and Team
 df_salaries %>% group_by(slugSeason,  nameTeam, isFinalSeason) %>%
 summarise(expiringSalaries = sum(amountContractMil, na.rm = T) / 1000000) %>%
 arrange(nameTeam)

abresler/nbastatR documentation built on Nov. 9, 2023, 2:33 p.m.