I\'m working with knitr lately and while most aspects of that have gone quite smoothly, there\'s one formatting issue with including R code in the finished document that I haven
The other solution is to use strwrap.
> longstr <- "This string will flow off the right side of the page, because tidy doesn't know how to wrap it."
> strwrap(longstr, 70)
[1] "This string will flow off the right side of the page, because tidy" "doesn't know how to wrap it."
> str(strwrap(longstr, 70))
chr [1:2] "This string will flow off the right side of the page, because tidy" "doesn't know how to wrap it."
Unfortunately, I do not know whether this will work with tidy, but it works extremely well with knitr's HTML output.