1
library(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?"))

ドキュメントをコンパイルすると、メモがまったく表示されません。

4

1 に答える 1

0

メモの複数列の配置 (デフォルトは だと思いますl) をに変更する必要がありますp{\linewidth}。これはオプションではありませんが (のみclr)、次の操作を実行できます。

  • を使用gsub{l}{p{\linewidth}}
  • gsubwithの副作用を元に戻す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")
于 2014-03-26T15:57:14.637 に答える