Learn R Programming

lavaSearch2 (version 1.0.0)

selectResponse: Response Variable of a Formula

Description

Return the reponse variable contained in the formula.

Usage

selectResponse(x, ...)

# S3 method for formula selectResponse(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 {
selectResponse(Y1~X1+X2)
selectResponse(Y1~X1+X2, type = "vars")
selectResponse(Surv(event,time)~X1+X2, type = "vars")

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

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

# }

Run the code above in your browser using DataLab