R/formula_vars_in_data.R
formula_vars_in_data.Rd
Check if formula variables are present in data
formula_vars_in_data(data, formula)
a tsibble
formula
formula_vars_in_data(
data = malaria_africa_ts,
formula = pr ~ dates
)
#> Error in formula_vars_in_data(data = malaria_africa_ts, formula = pr ~ dates): Not all variables in the formula were present in the data
#> ℹ Formula: ~, pr, and dates
#> ✔ Variables in data: `pr`
#> ✖ Variables not in data: `dates`
#> ℹ Double check the formula