[英]stargazer notes not appearing at all
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?"))
当我编译文档时,该注释根本没有出现。
您需要将笔记的多列对齐方式更改为p{\\linewidth}
(我想默认为l
)。 这不是一个选项(仅clr
),但是您可以执行以下操作。
gsub
将{l}
替换为{l}
{p{\\linewidth}}
cat(, sep="\\n")
撤销gsub
副作用 以下对我有用。
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")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.