Skip to content

Commit

Permalink
options
Browse files Browse the repository at this point in the history
  • Loading branch information
saiemgilani committed Oct 26, 2021
1 parent 3b43f1b commit febfede
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions R/cfbd_pbp_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,8 @@ cfbd_pbp_data <- function(year,
play_type = NULL,
epa_wpa = FALSE,
...) {
old <- options()
old <- options(list(stringsAsFactors = FALSE, scipen = 999))
on.exit(options(old))
options(stringsAsFactors = FALSE)
options(scipen = 999)
# Check if year is numeric, if not NULL
if (!is.null(year) & !(is.numeric(year) & nchar(year) == 4)) {
# Check if year is numeric, if not NULL
Expand Down
4 changes: 1 addition & 3 deletions R/espn_cfb_pbp.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
#' espn_cfb_pbp(game_id = 401282614)
#'
espn_cfb_pbp <- function(game_id){
old <- options()
old <- options(list(stringsAsFactors = FALSE, scipen = 999))
on.exit(options(old))
options(stringsAsFactors = FALSE)
options(scipen = 999)

play_base_url <- "http://site.api.espn.com/apis/site/v2/sports/football/college-football/summary?"

Expand Down

0 comments on commit febfede

Please sign in to comment.