break_up_matrix_term: Break up matrix terms

View source: R/helper_formula.R

break_up_matrix_termR Documentation

Break up matrix terms

Description

Sometimes there can be terms in a formula that refer to a matrix instead of a single predictor. This function breaks up the matrix term into individual predictors to handle separately, as that is probably the intention of the user.

Usage

break_up_matrix_term(formula, data)

Arguments

formula

A formula for a valid model.

data

The original data.frame with a matrix as predictor.

Value

A list containing the expanded formula and the expanded data.frame.


paasim/glmproj documentation built on April 14, 2024, 5:30 p.m.