Makes index of factor variables requiring indent from fmt_regression objects in Rmarkdown

# S3 method for fmt_regression
indent_key(x, ...)

Arguments

x

fmt_regression object

...

further arguments passed to or from other methods

Examples

library(lme4) mod_glmer <- glmer(am ~ hp + +wt + factor(cyl) + (1 | gear), mtcars, family = binomial) tglmer <- fmt_regression(mod_glmer, exponentiate = TRUE) # In RMarkdown, knitting to HTML: knitr::kable(as_tibble(tglmer), row.names = FALSE, caption = "Model Summary" ) %>% kableExtra::kable_styling( bootstrap_options = c("striped", "condensed"), font_size = 11, full_width = F ) %>% kableExtra::add_indent(indent_key(tglmer)) %>% kableExtra::footnote(general = "Model coefficients and p-values calculated using generalized linear mixed model, with random intercept specified as gear type.")
#> Warning: Please specify format in kable. kableExtra can customize either HTML or LaTeX outputs. See https://haozhu233.github.io/kableExtra/ for details.
#> Warning: Please specify format in kable. kableExtra can customize either HTML or LaTeX outputs. See https://haozhu233.github.io/kableExtra/ for details.
#> Warning: Please specify format in kable. kableExtra can customize either HTML or LaTeX outputs. See https://haozhu233.github.io/kableExtra/ for details.
#> #> #> |N = 32 |exp(Coefficient) |95% CI |p-value | #> |:-----------|:----------------|:-------------------------------------------------------------------|:-------| #> |hp |1.44 |0.54, 3.85 |0.5 | #> |wt |0.00 |0.00, 2291637610128 |0.3 | #> |factor(cyl) | | | | #> |4 |Ref. | | | #> |6 |35.6 |0.00, 3327203323 |0.7 | #> |8 |0.00 |0.00, 3069514445864636877868224604844428428628286666668260844202240 |0.7 |