r - Comment out some chunks/part of Rmd file -


is possible comment out part of rmd file includes more 1 chunk (eg: 4-5)? regular html comments did not work.

--- title: "untitled" author: "author" date: "5 august 2017" output: pdf_document ---  ```{r} print(123) ```  ```{r} 2**2 ``` <!--  # comment section starts  text not visible in output.  ```{r} <- 3*4 ``` text not visible in output.  # comment section ends -->  ```{r} print(1) ``` 

in past, remember reading somewhere in posts aimed in next version of knitr.

update: not looking solution use eval=false in every chunk need comment out text in between chunks well. also, looking elegant way this.

the above code outputs pdf output below:

enter image description here

surprisingly, works. same html comments (<!-- -->) not work in original rmarkdown script. part of skipping part of rmd file achieved after including below snippet surrounding code want skip executing.

<!--  # comment section starts  ```{r, include=false} knitr::opts_chunk$set(eval= false) ```  added end of comment:   ```{r, include=false, eval=true} knitr::opts_chunk$set(eval= true) ``` --> 

could 1 explain me issue in case?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -