change_target: Change left-hand side of formula

Description Usage Arguments Author(s) Examples

View source: R/change_target_function.R

Description

Changes the left-hand side of a formula

Usage

1
change_target(object, newtarget, oldtarget = NULL)

Arguments

object

object containing formula of interest

newtarget

character for new left-hand side

oldtarget

character to restrict to specific existing target. If NULL, any target will be changed.

Author(s)

Kim Rand-Hendriksen

Examples

1
2
3
formula1 <- oldtarget ~ x + y
change_target(formula1, "newtarget")
change_target(formula1, "newtarget", "not_this_target")

intelligentaccident/xreg documentation built on Jan. 17, 2021, 7:38 a.m.