I am using the knitr package with the option of external code. Is the there a way that I can skip a line in a chunk from being read? For example:
## @knitr chunk1
a <- 1:100
## This comment should not appear
## @knitr chunk2
print(a[1:12])
In the example above, I would like that the 3rd line will not appear in the final *.pdf. Thanks a lot for any hints.
Two ways to do this:
<<chunk1, echo=-2>>=which means you want to exclude the 2nd expression from the output;## @knitr go-away), or without a label at all (## @knitr)