form_resp: Get the response variable from a formula

View source: R/gam_formula.R

form_respR Documentation

Get the response variable from a formula

Description

This is the counterpart of rsample::form_pred.

Usage

form_resp(x)

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

Value

character the name of the response


tidysdm documentation built on April 3, 2025, 9:56 p.m.