I am writing a report using knitr in RStudio. Also using the psych package for factor analysis:
```{r, results='asis'}
library(psych)
data(Thurstone)
fa.Thurstone<-fa(Thurstone)
fa2latex(fa.Thurstone)
```
When I run this code chunk it causes an error:
! LaTeX Error: Unknown float option `d'.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.124 \begin{scriptsize} \begin{table}[htdp]
pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
When I save the TeX code it runs fine in LaTeX, but not in knitr.
Any suggestions on how to resolve this?