Text, margins principal()

35 views
Skip to first unread message

Simon Kiss

unread,
Dec 18, 2012, 10:32:08 AM12/18/12
to kn...@googlegroups.com
Hi there: I'm producing a report on a principal component analysis using principal() in the psych package.  I've used 
>print.psych(model, sort=TRUE, cut=0.3)
to produce the output that is attached.  Is there a way I can prevent the text from bleeding outside the shaded background?
Thank you
Screen shot 2012-12-18 at 10.27.46 AM.png

Yihui Xie

unread,
Dec 18, 2012, 10:52:22 PM12/18/12
to Simon Kiss, kn...@googlegroups.com
Two possibilities:

1. increase your page width (e.g. with the geometry package)
2. use the listings package (render_listings(), e.g.
https://github.com/yihui/knitr-examples/blob/master/015-listings.Rnw)

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

Simon Kiss

unread,
Dec 19, 2012, 12:12:59 PM12/19/12
to Yihui Xie, kn...@googlegroups.com
Hi there:
OK, I see that! That's really helpful. But do I put the particular arguments to the listings package (linewidth and such) in the render_listings() line? Or separately, in the latex document?
Simon

Yihui Xie

unread,
Dec 20, 2012, 9:42:59 PM12/20/12
to Simon Kiss, kn...@googlegroups.com
No. Actually you can try it before asking. It takes more time to type
this email than typing render_listings() and see what happens :)

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Wed, Dec 19, 2012 at 1:12 PM, Simon Kiss <sjk...@gmail.com> wrote:
> Hi there:
Reply all
Reply to author
Forward
0 new messages