Comments in bookdown

There are a few different things that we could be talking about here. I'm going to disambiguate each one.

Code comments. # marks comments in R code which would be inside of code chunks in an RMarkdown file.

What > does. Outside of the code chunks, lines in markdown beginning with > treated as blockquotes. They get a special highlighting in RStudio, but semantically, they are not comments. Here's how they render in the bookdown book.

Commented out text in RMarkdown. Occasionally, I use actual comments in RMarkdown to comment out text so that it does not appear in the final document. You can highlight RMarkdown text in RStudio and then use Code > Comment/Uncomment Lines to comment out lines of text. E.g.,

<!-- This is a comment. -->
<!-- This is a comment. -->
4 Likes