Learn R Programming

nbastatR (version 0.1.110202031)

get_seasons_rosters: NBA teams seasons rosters

Description

Rosters for each team of specified seasons

Usage

get_seasons_rosters(seasons = NULL, return_message = TRUE, nest_data = F)

Arguments

seasons

vector of seasons

return_message

if TRUE returns a message

nest_data

if TRUE nests data

Value

a `date_frame`

See Also

Other teams: get_drafts, get_teams_franchise_leaders, get_teams_players_seasons_summary_stats, get_teams_seasons_rankings

Other rosters: get_seasons_teams_rosters, get_team_season_roster

Examples

Run this code
# NOT RUN {
library(nbastatR)
library(dplyr)
df_rosters <- get_seasons_rosters(2015:2018)

### Mean Age by Season and Team
df_rosters %>%
group_by(slugSeason, slugTeam) %>%
summarise(ageMean = mean(agePlayer)) %>%
arrange(ageMean) %>%
ungroup()
# }

Run the code above in your browser using DataLab