powered by
This is the counterpart of rsample::form_pred.
form_resp(x)
character the name of the response
a formula
Note: this might not behave well with functions such as log(y). But neither does rsample::form_pred.
modified from https://stackoverflow.com/questions/13217322/how-to-reliably-get-dependent-variable-name-from-formula-object