title: How to get chunk name in knitr?
body: <p>I want to set the chunk option "eval" based on a list of chunk names. Is there a function to get the chunk name in knitr, e.g. chunk_name?</p>
  
  <p>This is my minimum example with fake function name "chunk_name".</p>
  
  <pre><code>---
  output: html_document
  ---
  
  ```{r setup}
  eval_chunks &lt;- c('chunk1')
  ```
  
  ```{r chunk1, eval=chunk_name() %in% eval_chunks}
  plot(cars)
  ```
  
  
  ```{r chunk2, eval=chunk_name() %in% eval_chunks}
  plot(cars)
  ```
  </code></pre>
  
  <p>Thanks for any suggestions. Please let me know if my question is not clear.</p>