Get substitution data for a single game from the CollegeBasketballData API.
Get substitution data for a single player from the CollegeBasketballData API.
Get substitution data for a team-season from the CollegeBasketballData API.
Usage
cbbd_substitutions_game(game_id)
cbbd_substitutions_player(player_id, season = most_recent_mbb_season())
cbbd_substitutions_team(season = most_recent_mbb_season(), team)Arguments
- game_id
(integer required): CollegeBasketballData game id. See
cbbd_games().- player_id
(integer required): Athlete id.
- season
(integer required): Season, 4-digit ending-year (e.g.
2024). Defaults tomost_recent_mbb_season().- team
(character required): Team name (e.g.
Duke).
Value
A hoopR_data tibble with one row per substitution.
Its columns are listed in return_columns
(subset(return_columns, fn == "cbbd_substitutions_game")) and in the searchable
return columns article.
A hoopR_data tibble with one row per substitution (same columns as
cbbd_substitutions_game()).
A hoopR_data tibble with one row per substitution (same columns as
cbbd_substitutions_game()).
Examples
# \donttest{
try(cbbd_substitutions_game(game_id = 5881))
#> ✖ 2026-11-13 21:11:18.869142: Invalid arguments or no substitution data available for 5881!
#> ✖ Args: game_id = 5881
#> ✖ Error: api.collegebasketballdata.com requires an API key. See ?register_cbbd for details.
#> data frame with 0 columns and 0 rows
# }
# \donttest{
try(cbbd_substitutions_player(player_id = 160, season = 2024))
#> ✖ 2026-11-13 21:11:18.879371: Invalid arguments or no substitution data available for player 160!
#> ✖ Args: player_id = 160, season = 2024
#> ✖ Error: api.collegebasketballdata.com requires an API key. See ?register_cbbd for details.
#> data frame with 0 columns and 0 rows
# }
# \donttest{
try(cbbd_substitutions_team(season = 2024, team = "Duke"))
#> ✖ 2026-11-13 21:11:18.889166: Invalid arguments or no substitution data available for Duke!
#> ✖ Args: season = 2024, team = "Duke"
#> ✖ Error: api.collegebasketballdata.com requires an API key. See ?register_cbbd for details.
#> data frame with 0 columns and 0 rows
# }
