Closed William8750 closed 7 years ago
In the body of your for
loop, you should:
docx
objectaddImage
function twice, for each call provide argument filename
(filename of image 1 and filename of image 2)writeDoc
to generate the document for patient X.really thank you for you patience and help My problem is in the second step how to call differently in the for loop two files
did you read the documentation?
Hi David, do you mean the manual of ReporteRs?
I mean ?addImage
ah yes of course!!!
Can you be more specific about what is the issue with ReporteRs? What error do you get? Do you have a reproducible example? Are you really facing an issue with ReporteRs or are you asking help for writing a for loop?
I'm having some trouble with the creation of a for loop with ReporteRs. The problem: I have a folder with several .png figures. Every patients have 2 figures and I would like to create a docx document (from a template) for every patients, thus a word file with two figures side-by-side.
My solution (but it does not work as i would like): I create a list with the name of patients file
Then I tried to create a for loop but it does not work at all. I would like that it creats as much docx as the number of patients (so in my example two words file) where have in first file only Patient1 images and then only patient2 figures in another word document.
Is there a way? thank you to everyone who whill help