Skip to content
Prev 199832 / 398503 Next

R echo code chunk runs off the page using Lyx and Sweave

Mark Connolly wrote:
I don't think so.  There is a strwrap() function that can do wrapping, 
but it might not produce beautiful output.

For example, if x is something where str(x) produces lines that are too 
long, you could do

cat(strwrap(capture.output(str(x)), width=20), sep="\n")

to get the results displayed in width 20.

Duncan Murdoch