yihui / knitr-examples

A collection of knitr examples
484 stars 587 forks source link

Issues with commenting on code lines appearing in compiled PDF #60

Open rpatel22 opened 6 years ago

rpatel22 commented 6 years ago

Hi

I've recently started to use knitr to compile latex documents.

<>=

Q1b

rep(11:15, times = c(1,5,2,2,1)) # the times vector tells us how much for each of respective numbers 10 to 15 we want repeat. @ image

I have fairly long comments because I'm trying to explain myself, but whenever the PDF is compiled. My comments are always cut off. Is there a way I can include my comments? I tried tidy=TRUE but nothing happened.

Thanks

yihui commented 6 years ago

Inline comments cannot be wrapped. Use standalone blocks of comments.

rpatel22 commented 6 years ago

thanks