View source: R/coef-equation.R
coef_equation | R Documentation |
Print a model as an equation
coef_equation(mod, FUN = sf2, ...)
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' |
mod <- lm(Sepal.Length ~ Sepal.Width + Petal.Length, data = iris) coef_equation(mod) # "2.2 + Sepal.Width \* 0.60 + Petal.Length \* 0.47"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.