Learn R Programming

mmodely (version 0.2.5)

get.mod.vars: Get model variable names

Description

Split the predictor string of a model formula into it's constituent character strings.

Usage

get.mod.vars(model)

Value

a vector of character strings of variable names (e.g. corresponding to column names for comp.data input)

Arguments

model

a character string of a formula of the form 'y ~ x1 + x2'

Examples

Run this code

model.variables <- get.mod.vars(model='y ~ x1 + x2')

Run the code above in your browser using DataLab