diff --git a/R/cfbd_pbp_data.R b/R/cfbd_pbp_data.R index 51e1d537..b70295e5 100644 --- a/R/cfbd_pbp_data.R +++ b/R/cfbd_pbp_data.R @@ -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 diff --git a/R/espn_cfb_pbp.R b/R/espn_cfb_pbp.R index 49ddccd9..f3013a78 100644 --- a/R/espn_cfb_pbp.R +++ b/R/espn_cfb_pbp.R @@ -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?"