0

When I summarize my regression outputs in a modelsummary table, I get an unpleasant formatting problem.

I used the following code:

modelsummary(ols, statistic = "p.value")

and get the following output when I knit it to PDF.

Output after knitting to PDF

The separating line has these colons and is not nicely formatted.

Does anyone know a way to fix this issue. Many thanks.

Felix
  • 1
  • 1
  • 2
    Welcome to SO! Could you provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) of your issue, i.e. a minimal working Rmd file? For example running `ols <- lm(mpg ~ hp, data = mtcars)` and your provided code in an otherwise empty Rmd worked fine for me and the rendered pdf shows no colons. I'm using `modelsummary` version `1.4.1`. – stefan Jun 01 '23 at 20:47
  • Also you may want to check the section header and see if `results = 'asis'` is specified (see https://bookdown.org/yihui/rmarkdown-cookbook/results-asis.html) – br00t Jun 01 '23 at 20:53
  • Felix, can you make sure you have installed the `kableExtra` package? It looks like tables are printed as markdown instead of LaTeX, and that can happen when kableExtra is not available on the local computer. (I am the modelsummary maintainer.) – Vincent Jun 02 '23 at 12:03
  • Unfortunately, non of your suggestions was successful. I installed kableExtra, MacTex, and tinytex. Many thanks for your help. – Felix Jun 03 '23 at 13:52

0 Answers0