selectRegressor: Regressor of a Formula.

selectRegressorR Documentation

Regressor of a Formula.

Description

Return the regressor variables contained in the formula

Usage

selectRegressor(object, ...)

## S3 method for class 'formula'
selectRegressor(object, format = "call", ...)

Arguments

object

a formula

...

[internal] Only used by the generic method.

format

[character] should an object of format call be returned (format = "call"), or the names of the variables (format = "vars")

Examples


## Not run: 

selectRegressor <- lavaSearch2:::selectRegressor
selectRegressor.formula <- lavaSearch2:::selectRegressor.formula

selectRegressor(Y1~X1+X2)
selectRegressor(Y1~X1+X2, format = "vars")

selectRegressor(Y1~X1+Y1)
selectRegressor(Y1+Y2~X1+Y1, format = "vars")

selectRegressor(~X1+X2)
selectRegressor(~X1+X2, format = "vars")


## End(Not run)

lavaSearch2 documentation built on April 12, 2023, 12:33 p.m.