I can create a report object, but when I export() it, there is a generic file name containing a random number. I want to be able to specify the file name.
for (report in c("file1", "file2", "file3")) {
myReport <- Pandoc$new(author="Jerubaal",title="What's my file name?", format="docx")
myReport$add.paragraph(paste("This is", report))
myReport$export(open = FALSE)
}
This gives me files with names such as
- pander-1c246b334f70.docx
- pander-1c246b334f70.md
I have tried adding these to Pandoc$new() and also to myReport$export(), but to no avail:
- output=report
- file=report
- filename=report
I will be looping through a lot of things, each of which needs its own report file, so I can't manually rename the files efficiently.
How do I specify the output file name? Thanks!