selectResponse: Response Variable of a Formula

selectResponseR Documentation

Response Variable of a Formula

Description

Return the response variable contained in the formula.

Usage

selectResponse(object, ...)

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

Arguments

object

a formula

...

[internal] Only used by the generic method.

format

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

Value

See argument format.

Examples


## Not run: 

selectResponse <- lavaSearch2:::selectResponse
selectResponse.formula <- lavaSearch2:::selectResponse.formula

selectResponse(Y1~X1+X2)
selectResponse(Y1~X1+X2, format = "vars")
selectResponse(Surv(event,time)~X1+X2, format = "vars")

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

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

## End(Not run)


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