as_model_df: Expand 'data.frame' into a design matrix

View source: R/utilities.R

as_model_dfR Documentation

Expand data.frame into a design matrix

Description

Expands out a data.frame using a formula to create a design matrix. Key details are that it will always place the outcome variable into the first column of the return object.

Usage

as_model_df(dat, frm)

Arguments

dat

a data.frame

frm

a formula

Details

The outcome column may contain NA's but none of the other variables listed in the formula should contain missing values


rbmi documentation built on Nov. 24, 2023, 5:11 p.m.