Learn R Programming

BMisc (version 1.3.0)

toformula: toformula

Description

take a name for a y variable and a vector of names for x variables and turn them into a formula

Usage

toformula(yname, xnames)

Arguments

yname

the name of the y variable

xnames

vector of names for x variables

Value

a formula

Examples

Run this code
# NOT RUN {
toformula("yvar", c("x1","x2"))

# }

Run the code above in your browser using DataLab