Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
856 views
in Technique[技术] by (71.8m points)

r - Stargazer notes line wrap?

Is there a way to get notes in stargazer to wrap lines instead of running off the page?

stargazer(fit.1, notes="A very very long note that I would like to put below the table, but currently runs off the side of the page when I compile my document. How do I get this to wrap into paragraph form?")

Which produces:

hline \[-1.8ex] 
extit{Notes:} & multicolumn{2}{l}{$^{*}$P $<$ .05} \ 
 & multicolumn{2}{l}{$^{**}$P $<$ .01} \ 
 & multicolumn{2}{l}{$^{***}$P $<$ .001} \ 
 & multicolumn{2}{l}{A very very long note that I would like to put below the table, but currently runs off the side of the page when I compile my document. How do I get this to wrap into paragraph form?} \ 

ormalsize 
end{tabular} 
end{table} 

I couldn't find anything in the manual for adjusting this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The notes argument accepts a vector of character strings, and will put each on a new line. In your example, the following should work:

stargazer(linear.1, notes=c("A very very long note that I would like to put below the table,",
                     "but currently runs off the side of the page",
                     "when I compile my document.",
                     "How do I get this to wrap into paragraph form?"))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...