Learn R Programming

lavaSearch2 (version 1.4)

selectRegressor: Regressor of a Formula.

Description

Return the regressor variables contained in the formula

Usage

selectRegressor(object, ...)

# S3 method for 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

Run this code
# NOT RUN {
# }
# 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")

# }

Run the code above in your browser using DataLab