I am working on a document about R software, which is currently stored in a Rnw file to eventually process it with Sweave. The document contains several R code chunks, of the usual form:
<<>>=
R Code
@
Next to some code lines, I would like to add specific comments, which I would like to be displayed like usual LaTeX text (so that they are easily recognizable as comments). Is there a way to display R code chunks and corresponding comments next to each other when using sweave or knitR?
Thank you for your help!
#
comment character. It sounds like you don't want comments, you want standard LaTeX (the content of which may or may not be to comment on the R code as you wish). – Gregor Thomasknitr
. – Gregor Thomas