I realize this is probably quite simple, but I have looked and can't find an example of how to use sjPlot::tab_model in an Rmarkdown document sent to PDF.
Here is reproducible code:
---
title: "test"
author: "Me"
date: "2020/12/6"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(sjPlot)
A table
tab_model(lm(mpg~cyl, data=mtcars))
And what I get looks something like this:
A table tab_model(lm(mpg~cyl, data=mtcars)) mpg Predictors Estimates CI p (Intercept) 37.88 33.65 – 42.12 <0.001 cyl -2.88 -3.53 – -2.22 <0.001 Observations 32 R2 / R2 adjusted