I am sadly using Windows 7, which could be the problem...
I want to add a existing image file to a pander report, using live report generation on the Windows platform, outputting to 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()
Alas, there is no image included when running it in Windows (not even in the md file).
It doesn't work if I try putting the code straight in:
myReport$add("")
If I try this:
myReport$add("")
I just get the text for the path: /plots/temp.png
Any suggestions?
FYI: Some time ago, trying out ggplot, I got it to work in Ubuntu: earlier question
This report was generated with R (3.0.3) and pander (0.3.9) in 0.02 sec on x86_64-w64-mingw32 platform.