library(stargazer)
我正在尝试使用与stargazer的notes参数,但它显然不起作用。这里的代码改编自先前的堆栈溢出观星问题:
stargazer(mtcars, 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?"))
编辑文档时,笔记根本不显示。
答案 0 :(得分:0)
您需要将音符的多列对齐(我猜默认值为l
)更改为p{\linewidth}
。这不是一个选项(仅clr
),但您可以执行以下操作。
gsub
将{l}
替换为{p{\linewidth}}
gsub
与cat(, sep="\n")
以下适用于我。
cat(gsub("\\{l\\}", "{p{\\\\linewidth}}", stargazer(mtcars, 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?")), sep="\n")