title: How to set different global options in knitr RMD file
body: <p>I want to exclude a lot of code chunks in my RMD file and had the idea to set the global options with <code>eval = FALSE</code> before and then <code>eval = TRUE</code> afterwards. But this is not working. </p>
  
  <p>Here a toy example:</p>
  
  <pre><code>---
  output: html_document
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = FALSE, eval = FALSE)
  ```
  ## will not be executed because global option `eval = FALSE`
  ```{r}
  x+y
  ```
  
  ```{r setup II, include=FALSE}
  knitr::opts_chunk$set(eval = TRUE, echo = TRUE)
  ```
  ## Should give `2` in final document, because eval = TRUE
  ## NOT working as expected
  ```{r}
  1+1
  ```
  
  ## This is working as expected
  ```{r, eval = TRUE}
  1+1
  ```
  </code></pre>
  
  <p>Here the result:</p>
  
  <p><a href="https://i.stack.imgur.com/XEAof.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XEAof.jpg" alt="enter image description here"></a></p>
  
  <p>Is this a bug or a feature? For my opinion this works counter-intuitive ... </p>