coef_equation: Print a model as an equation

View source: R/coef-equation.R

coef_equationR Documentation

Print a model as an equation

Description

Print a model as an equation

Usage

coef_equation(mod, FUN = sf2, ...)

Arguments

mod

A model, something which 'stats::coef()' can extracted a named vector

FUN

A function to apply to the values of 'stats::coef(mod)', for formatting; default formats to 2 significant figures with trailing zeros

...

Additional arguments passed to 'FUN'

Examples

mod <- lm(Sepal.Length ~ Sepal.Width + Petal.Length, data = iris)
coef_equation(mod)
# "2.2 + Sepal.Width \* 0.60 + Petal.Length \* 0.47"

jmbarbone/jordanExtra documentation built on Aug. 4, 2023, 5:37 p.m.