From 506cc6d6abaafc69bff1b07a89b9d85523f62fb0 Mon Sep 17 00:00:00 2001 From: Tan-DESKPC Date: Sun, 16 Jan 2022 11:25:18 -0500 Subject: [PATCH] ep_load doesn't have an arg --- R/ep_load.R | 3 ++- man/ep_load.Rd | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/R/ep_load.R b/R/ep_load.R index 65b9506..e20572d 100644 --- a/R/ep_load.R +++ b/R/ep_load.R @@ -3,7 +3,7 @@ #' This function downloads precomputed expected points data from the ffopportunity automated releases. #' #' @param season A numeric vector of four digit years associated with given NFL seasons - defaults to latest season. -#' @param type Data type - one of `"weekly"`, `"pbp_pass"`, `"pbp_rush"`, or `"all"` +#' @param type Data type - one of `"weekly"`, `"pbp_pass"`, or `"pbp_rush"` #' @param version EP model version: one of "latest" (default) or "v1.0.0" - these are currently identical. #' #' @return a dataframe identical to what would be returned by `ffopportunity::ep_build()` for a given season. @@ -27,6 +27,7 @@ ep_load <- function(season = nflreadr:::most_recent_season(), version <- rlang::arg_match0(version, c("latest","v1.0.0")) type <- rlang::arg_match0(type, c("weekly","pbp_pass","pbp_rush")) + stopifnot( length(season) > 0, is.numeric(season), diff --git a/man/ep_load.Rd b/man/ep_load.Rd index 983d764..1b820d3 100644 --- a/man/ep_load.Rd +++ b/man/ep_load.Rd @@ -13,7 +13,7 @@ ep_load( \arguments{ \item{season}{A numeric vector of four digit years associated with given NFL seasons - defaults to latest season.} -\item{type}{Data type - one of \code{"weekly"}, \code{"pbp_pass"}, \code{"pbp_rush"}, or \code{"all"}} +\item{type}{Data type - one of \code{"weekly"}, \code{"pbp_pass"}, or \code{"pbp_rush"}} \item{version}{EP model version: one of "latest" (default) or "v1.0.0" - these are currently identical.} }