How do I comment out text in an RMD file?

In R markdown (.Rmd) file, how do I comment out unused text? I'm not referring to the text in the R code chunk, but the general texts, like % in LaTex for example.


I think you should be able to use regular html comments:

<!-- regular html comment --> 

Does this work for you?


Extra yaml blocks can be used anywhere inside the document, and commented out with #

---
title: "Untitled"
output: html_document
---

No comment.

---
# here's a comment
# ```{r}
# x = pi
# ```
--- 

Note however that this does not prevent knitr from evaluating inline r code.

链接地址: http://www.djcxy.com/p/20146.html

上一篇: 多行<blockquote>在使用Markdown语法的行中?

下一篇: 如何注释RMD文件中的文本?