title: Unwanted R code echo when compiling PDF with knitr
body: <p>I have an .Rnw file that contains the code below. Run <code>knitr::knit()</code> once and the R code doesn't doesn't echo. Run <code>knitr::knit()</code> a second time and the R code echoes in the PDF. Why? How can I prevent R code from echoing?</p>
  
  <pre><code>&lt;&lt;load_chapter_2, echo=FALSE, warning=FALSE, message=FALSE,cache=TRUE&gt;&gt;=
  
  options(digits=2)
  
  opts_chunk$set(eval=TRUE, results = "hide", echo=FALSE, warning=FALSE, message=FALSE, fig.height=5, fig.width=5, fig.pos="!ht", fig.align='center')
  
  @
  
  
  \documentclass[a4paper,11pt]{article}
  
  \usepackage{lipsum} % Required to insert dummy text
  
  % \usepackage{nameref} commented out as was causing extra \else error
  
  \usepackage{graphicx}
  
  \usepackage{placeins} % to control figure placement with \FloatBarrier
  
  \usepackage{xspace}
  
  \usepackage{caption}
  
  \usepackage{subcaption}
  
  \usepackage{array} % for line breaks in table
  
  \usepackage[comma, sort&amp;compress]{natbib} 
  \setlength{\bibsep}{0pt plus 0.3ex}
  
  
  \begin{document}
  \title{}
  \author{}
  \date{\today}
  \maketitle
  
  \section{Header}
  
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  
  &lt;&lt;plot_1&gt;&gt;=
  
  plot(1)
  
  @
  \FloatBarrier
  
  
  \end{document}
  </code></pre>