When I render a simple Rmarkdown document as github_document, the table caption appears below the table rather than above. It also lacks the "Table: " prefix. Is there any way to change this behavior? Xie Yihui has made clear that kable's default caption position should be above the table and when I run the same command outside of the Rmarkdown file, the caption does indeed appear on top.
The command I am referring to is
knitr::kable(mtcars, caption = "mtcars")
and my Rmarkdown document looks like this:
---
title: "Test"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
knitr::kable(mtcars, caption = "mtcars")
```
Specifying format = "pipe" or format = "simple" does not seem to help.