diff --git a/R/report_fishery_mortality.R b/R/report_fishery_mortality.R index c961d7c..da66b5b 100644 --- a/R/report_fishery_mortality.R +++ b/R/report_fishery_mortality.R @@ -111,17 +111,17 @@ fishery_mortality <- function(fram_db, run_id = NULL, msp = TRUE) { coho_stock_mortality <- function(fram_db, run_id = NULL, stock_id = NULL, top_n = 10){ # check for null ids - if (is.null(.env$run_id) | is.null(.env$stock_id)) { + if (is.null(run_id) | is.null(stock_id)) { rlang::abort("Both a run_id and stock_id must be supplied") } # make sure run ids are integers - if (!is.numeric(.env$run_id)) { + if (!is.numeric(run_id)) { rlang::abort("Run ID must be and integer") } # make sure run ids are integers - if (!is.numeric(.env$stock_id)) { + if (!is.numeric(stock_id)) { rlang::abort("Stock ID must be and integer") } diff --git a/R/report_stock_mortality.R b/R/report_stock_mortality.R index 699bd56..4cfbc80 100644 --- a/R/report_stock_mortality.R +++ b/R/report_stock_mortality.R @@ -5,7 +5,7 @@ #' @examples #' \dontrun{ #' fram_db |> -#' stock_mortality(run=132) |> +#' stock_mortality(run_id=132) |> #' filter(stock_id == 17, fishery_id == 36) #' #' } diff --git a/man/stock_mortality.Rd b/man/stock_mortality.Rd index 0b4c14d..244174f 100644 --- a/man/stock_mortality.Rd +++ b/man/stock_mortality.Rd @@ -17,7 +17,7 @@ Returns a tibble matching the Fishery Mortality screen. \examples{ \dontrun{ fram_db |> - stock_mortality(run=132) |> + stock_mortality(run_id=132) |> filter(stock_id == 17, fishery_id == 36) }