From febfede0e3505fc7cc070af329e1d0c897f1e9e4 Mon Sep 17 00:00:00 2001 From: Saiem Gilani Date: Tue, 26 Oct 2021 13:21:44 -0400 Subject: [PATCH] options --- R/cfbd_pbp_data.R | 4 +--- R/espn_cfb_pbp.R | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) 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?"