build_predictor_dataframe: Constructs a dataframe collecting the predictors from a...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

'build_predictor_dataframe' searches the environment in which a formula was defined and collects the vectors associated with the predictors of that formula into a dataframe.

Usage

1

Arguments

form

A formula.

Value

A dataframe.

Each column of the dataframe is the vector of values associated with a predictor in 'form'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(RGOB)
A <- c(1,2,3,4)
X <- c(5,6,7,8)
Z <- c(1,0,1,0)
build_predictor_dataframe(A ~ X + Z)
# returns: 
# X Z
# 5 1
# 6 0
# 7 1
# 8 0

## End(Not run)

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