I am using knitr (1.9.5 and 1.9.17) and rmarkdown (0.5.3.1), and would like to hold figure position in the pdf output. The generated pdf file is working fine when chunk opti
As Andrew pointed out, this fig.pos doesn't work in chunks, but it does work if it is put in global options:
```{r global_options, include=FALSE}
knitr::opts_chunk$set(fig.pos = 'H')
```
EDIT: the above apparently used to work and needs \usepackage{float} in the preamble:
header-includes:
\usepackage{float}
See also here.