残念ながらWindows 7を使用していますが、これが問題になる可能性があります...
Windows プラットフォームでのライブ レポート生成を使用して、既存の画像ファイルをパンダー レポートに追加し、docx に出力したいと考えています。
library(pander)
setwd("T:/R/Temp") #this contains the subfolder & file /plots/temp.png
myReport = Pandoc$new(author="Jerubaal",title="Where's my picture?", format="docx")
myReport$add.paragraph("There should be a picture after this.")
myReport$add(pandoc.image("/plots/temp.png"))
myReport$add.paragraph("There should be a picture before this.")
myReport$export()
残念ながら、Windows で実行した場合、イメージは含まれていません (md ファイルにもありません)。
コードをそのまま入れようとしてもうまくいきません:
myReport$add("")
私がこれを試してみると:
myReport$add("")
パスのテキストを取得するだけです: /plots/temp.png
助言がありますか?
参考までに: 少し前に ggplot を試してみたところ、Ubuntu で動作するようになりました:以前の質問
このレポートは、x86_64-w64-mingw32 プラットフォームで R (3.0.3) とパンダー (0.3.9) を使用して 0.02 秒で生成されました。