I have an incosistent behavior when clicking the knit button versus launching rmarkdown::render
.
I have a parameterized .Rmd called test.Rmd:
---
title: '`r params$college` report'
params:
college: 'Art & Business'
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = F)
```
```{r}
library(tidyverse)
library(knitr)
library(kableExtra)
```
```{r}
mtcars %>%
kable( format = 'latex', longtable = T, booktabs = T) %>%
kable_styling(bootstrap_options = "condensed", font_size = 8) %>%
landscape(margin = c('1cm'))
```
The files knits if I click on the knit button. However, if I knit from the console using:
rmarkdown::render('test.Rmd',
params = list(college = 'Art and Business'),
output_format = 'pdf_document')
I get the following error:
/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable 'geometry:margin=1in' ! LaTeX Error: Environment landscape undefined.
Error: Failed to compile test.tex. See test.log for more info.