Skip to content

Commit

Permalink
Feat: added on_court parameter to nba_pbp() and nba_pbps() func…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
saiemgilani committed Nov 25, 2023
1 parent 82674d7 commit 8e217ec
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions R/nba_stats_pbp.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ NULL
tmp_gameid <- pbp_data$game_id[1]
}

tmp_data <- hoopR::nba_boxscoretraditionalv2(game_id = tmp_gameid, start_period = x, end_period = x, range_type = 1)$PlayerStats
tmp_data <- nba_boxscoretraditionalv2(game_id = tmp_gameid, start_period = x, end_period = x, range_type = 1)$PlayerStats

all_id <- as.integer(tmp_data$PLAYER_ID)

Expand Down Expand Up @@ -276,7 +276,7 @@ NULL
#' ```
nba_pbp <- function(
game_id,
on_court = FALSE,
on_court = TRUE,
version = "v2",
p,
...){
Expand Down Expand Up @@ -467,7 +467,7 @@ NULL
#' ```
nba_pbps <- function(
game_ids = NULL,
on_court = FALSE,
on_court = TRUE,
version = "v2",
nest_data = FALSE,
...) {
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ custom_mode <- function(x, na.rm = TRUE) {
#' @export
most_recent_mbb_season <- function() {
ifelse(
as.double(substr(Sys.Date(), 6, 7)) >= 10,
as.double(substr(Sys.Date(), 6, 7)) > 10,
as.double(substr(Sys.Date(), 1, 4)) + 1,
as.double(substr(Sys.Date(), 1, 4))
)
Expand Down
8 changes: 8 additions & 0 deletions man/dot-players_on_court.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/nba_pbp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/nba_pbps.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8e217ec

Please sign in to comment.