Reputation: 175
I'm trying to render a Rmd file in a script:
rmarkdown::render("Test.Rmd")
Which works fine when I knit the file itself but if it contains kable_styling options at all e.g.
```{r, echo = FALSE}
library(kableExtra)
dt <- mtcars[1:5, 1:6]
kable(dt, align = "c", format="latex", booktabs=T) %>%
kable_styling(latex_options=c("striped", "scale_down"), font_size = 7, html_font = "Times New Roman")
#three backticks to close
I get this error:
! LaTeX Error: Unknown float option `H'.
I've tried each argument by itself, but it only runs if I remove the whole line.
Is there a way around this? I want to use render so I can dynamically generate the filename - maybe there is a better way?
Upvotes: 3
Views: 1189