utility_formula: Create formulas from the utility functions

View source: R/parsing.R

utility_formulaR Documentation

Create formulas from the utility functions

Description

Create formulas from the utility functions such that we can create correct model matrices. The formula of each utility function contains its terms, i.e. the utility function without the parameters.

Usage

utility_formula(x)

Arguments

x

An object of class utility

Details

Note that the formulas are created from the cleaned utility expression and **not** the updated utility expression. This is because we are converting dummy coded attributes to factors prior to calling model.matrix. This ensures that dummy coded attributes are correctly returned with the model matrix.

Value

A list of formula expressions for the utility functions


spdesign documentation built on Oct. 6, 2026, 9:07 a.m.