Learn R Programming

lavaSearch2 (version 1.0.0)

selectRegressor: Regressor of a Formula.

Description

Return the regressor variables contained in the formula

Usage

selectRegressor(x, ...)

# S3 method for formula selectRegressor(x, type = "call", ...)

Arguments

x

a formula

...

additional arguments to be passed to lower levels functions.

type

either return an object of type call ("call") or the names of the variables ("vars")

Examples

Run this code
# NOT RUN {
selectRegressor(Y1~X1+X2)
selectRegressor(Y1~X1+X2, type = "vars")

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

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

# }

Run the code above in your browser using DataLab