diff --git a/R/prep_trajectory.R b/R/prep_trajectory.R index c1b31470..bdf30e56 100644 --- a/R/prep_trajectory.R +++ b/R/prep_trajectory.R @@ -33,9 +33,7 @@ prep_trajectory <- function(data, span_5yr = FALSE, value_col = "percentage_of_initial_production_by_scope") { - env <- list(data = substitute(data)) - - check_prep_trajectory(data, value_col = value_col, env = env) + check_prep_trajectory(data, value_col = value_col) data <- data %>% prep_common() %>% @@ -49,7 +47,7 @@ prep_trajectory <- function(data, data } -check_prep_trajectory <- function(data, value_col, env) { +check_prep_trajectory <- function(data, value_col) { stopifnot(is.data.frame(data)) crucial <- c(common_crucial_market_share_columns(), value_col) hint_if_missing_names(abort_if_missing_names(data, crucial), "market_share")