观星者注意到根本没有出现

时间:2014-03-26 15:11:41

标签: r latex stargazer

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?"))

编辑文档时,笔记根本不显示。

1 个答案:

答案 0 :(得分:0)

您需要将音符的多列对齐(我猜默认值为l)更改为p{\linewidth}。这不是一个选项(仅clr),但您可以执行以下操作。

  • 使用gsub{l}替换为{p{\linewidth}}
  • 撤消gsubcat(, 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")