Skip to content
Prev 67419 / 398506 Next

Sweave and abbreviating output from R

Roger Bivand wrote:
<snip>
Thanks Roger - that got it! using combinations of:

<<echo=true,eval=FALSE>>=
summary(pondspca, scaling = 2)
@
<<echo=false,eval=true>>=
out <- capture.output(summary(pondspca))
cat(out[1:27], "....", out[43:48], "....", sep = "\n")
@

displays the relevant commands to the user but hides the semi-automatic 
printing of the selected sections.

All the best,

Gav