Florian Reiche
Florian Reiche

Reputation: 11

`modelsummary` caption is at the top

I have the opposite problem to the one discussed here, in that for me the caption consistently appears above the table and not underneath. I have used the MWE provided here and below, but the caption remains on top.

---
title: Cross-references with `Rmarkdown`, `bookdown` and `modelsummary`
output: 
  bookdown::pdf_document2:
    toc: false
---

The `bookdown` package allows you to compile PDF documents with table numbers and cross references. To do this, you must include a title in your table, use the `\@ref{tab:name}` construct, and give a name to the `R` chunk where `modelsummary` is called. 

For example, see Table \@ref(tab:test).

```{r}
library(modelsummary)
mod <- lm(hp ~ mpg, mtcars)
modelsummary(mod, title = '(#tab:test) This title describes the content of this table.')
```

I prefer captions underneath - is there a way to change this? The bootstrap package does not seem to have an option for this.

Upvotes: 0

Views: 47

Answers (0)

Related Questions