1

Pander を使用して、特に Live report Generation を使用して、3D テーブルを .docx レポートに追加しようとしています。

A=sample(LETTERS[1:5],100, rep=T)
b=sample(letters[1:2],100, rep=T)
numbers=sample(1:3,100, rep=T)

tab=table(A,b,numbers)
tab1=ftable(addmargins(tab))

tempReport=Pandoc$new(title="Pander and ftable", format="docx")

tempReport$add.paragraph("### table: tab")
tempReport$add(tab)

tempReport$add.paragraph("### table: tab1")
tempReport$add(tab1)

tempReport$export()

ただし、多次元テーブルを処理できないようです。

data.frame(txt = cells, width = cols.width, justify = justify) のエラー: 引数は異なる行数を意味します: 5, 3

これを回避する方法はありますか?ありがとう!

編集: @daroczig に感謝します: 開発ビルドを使用して、3D テーブルが表示されるようになりました! 列/行の名前は引用符 "" で囲まれていますが、それ以外は問題ないようです。

4

0 に答える 0