R knit to PDF - how to wrap long lines


#1

Hi everyone:

When knitting RStudio file to PDF, the longer lines of code and text keep getting cut off on the output. Is there any way we can wrap these lines automatically for the output please?

Thanks!


#2

Hi LearnLearn - I had a look on the net, and wondered if this post was of any use to you?


#3

Hi, check this out:

https://github.com/yihui/knitr-examples/blob/master/077-wrap-output.Rmd

Modifying that function seemed to work for me.