I'm trouble getting Rmarkdown to text wrap when it reaches a certain line length. Currently, it adds a horizontal scrollbar, but ideally it would just wrap the text.
I have tried using
knitr::opts_chunk$set(tidy=TRUE,
tidy.opts=list(width.cutoff=60))
It works on some code chunks but not others.
My first code chunk, it works. (code is on the left, output is on the right)
But later in the document, knitr no longer wraps comments. (code is on the left, output is on the right)
How can I force knitr to wrap all the code chunks, including the comments?