Where to put header.tex to change page to Landscape Rmarkdown
<p>I read here how to add what is needed to give me the ability to change my page to landscape:
<a href="https://stackoverflow.com/questions/25849814/rstudio-rmarkdown-both-portrait-and-landscape-layout-in-a-single-pdf">enter link description here</a></p>

<p>However I have saved the header.tex file everyplace I could think of and I still end up getting the following error:</p>

<pre><code>Called from: (function (e) 
{
if (inherits(e, "shiny.silent.error")) 
    return()
handle &lt;- getOption("shiny.error")
if (is.function(handle)) 
    handle()
})(list(message = "pandoc document conversion failed with error 43", 
call = NULL))
Browse[1]&gt; 
</code></pre>

<p>I know this is do to me typing \blandscape and \elandscape because the PDF works as soon as I delete those commands. What I need help with is figuring out where to save the header.tex file to so that Rmarkdown knows how to locate it. Thanks in advance for everyone's your help!</p>

<p>Follow up:
Taking scoa's advice about adding it to my header I edited the top of my Rmd file to the following. Unfortunately it still didn't work.</p>

<pre><code>---
title: "Lake Report"
output: pdf_document
header-includes:
- \usepackage{lscape}
- \newcommand{\blandscape}{\begin{landscape}}
- \newcommand{\elandscape}{\end{landscape}}
---
\newpage
\blandscape
```{r Non-Seasonal MK results, echo=FALSE}
# MKanalysis &lt;- reactive(HM_MK(data = NonSeasonalData(),n = 4))
kable(MKanalysis(), caption = "Non-Seasonal Trend Analysis")
```
The results of the Mann Kendall analysis....
\elandscape
</code></pre>

<p>Latex program/verision: pdfTex, Version 3.14159265-2.6-1.40.17  </p>