Learn R Programming

lava (version 1.6.4)

toformula: Converts strings to formula

Description

Converts a vector of predictors and a vector of responses (characters) i#nto a formula expression.

Usage

toformula(y = ".", x = ".")

Arguments

y

vector of predictors

x

vector of responses

Value

An object of class formula

See Also

as.formula,

Examples

Run this code
# NOT RUN {
toformula(c("age","gender"), "weight")

# }

Run the code above in your browser using DataLab