Learn R Programming

tidysdm (version 1.0.0)

form_resp: Get the response variable from a formula

Description

This is the counterpart of rsample::form_pred.

Usage

form_resp(x)

Value

character the name of the response

Arguments

x

a formula

Details

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