I'm using rmarkdown to output a PDF document, however adding captions to plots seems not to be working. According to the docs, we're supposed to be using fig.cap
to specify figure captions to pass to Latex. This is the header of my code chunk:
```{r Plot bond index returns, include = TRUE, fig.cap = "Bond index cumulative returns"}
I made sure to include the following lines in the header of the rmarkdown document
output:
pdf_document:
fig_caption: true
This setup eliminates the entire chunk's output from the resulting PDF completely