fmt_terms: fmt_terms

View source: R/knitr_utils.R

fmt_termsR Documentation

fmt_terms

Description

Format estimate and 95% CIs for inline markdown

Usage

fmt_terms(
  models,
  str =
    "$\\beta={signif(estimate, 2)}$ ({signif(conf.low, 2)}, {signif(conf.high, 2)})"
)

Arguments

models

A named list of models

str

A glue format string, Default: '$\\beta=signif(estimate, 2)$ (signif(conf.low, 2), signif(conf.high, 2))'

Details

Provide a named list of regression models, and the resulting named list will have a formatted string suitable for inline rmarkdown

Value

A name list of model statistics, including str, a string version of the term estimate.

Examples

## Not run: 
if(interactive()){
 stats <- fmt_terms(list(m1 = lm(mpg ~ hp, mtcars), m2 = lm(mpg ~ wt, mtcars)))
 stats$m1$hp$str
 }

## End(Not run)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.