get_predictor_names: Extracts the names of the predictors in a formula

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Extracts the names of the predictors in a formula

Usage

1

Arguments

form

A formula

Value

a vector of string representing the names of the predictors

Examples

1
2
3
4
5
6
## Not run: 
get_predictor_names(Y ~ X + Z) # returns: c("X", "Z")
get_predictor_names(Y ~ X:C) # returns: c("X", "C")
get_predictor_names(Y ~ X + B + X:C) # returns: c("X", "B", "C")

## End(Not run)

gwb/RGOB documentation built on May 14, 2021, 7:39 a.m.