JanaJarecki/cognitivemodels

Descriptive error message if LHS and RHS of formula are switched?

Opened this issue · 0 comments

ebm_j(f1 + f2 ~ rp, ~c, data = dt, fix = pars)

To date we have the following error:
Error in private$get_input(f = self$formulaCriterion, d = d, na.action = NULL) :
Can't find variables from 'formula' in 'data': [c].

Maybe we could add an error stating that the LHS of the formula should only contain one variable (e.g., stating that the user might have switched the LHS and the RHS)?