I'm trying to write a code that automates emailing (with emayili) R markdown reports with filtered data. Each user (email) should get his\her own unique filtered data fed into the email report.
My solution was to define a filter based on an R markdown parameter, and then (for) loop over the params arg in the render() function, outside the .Rmd file in a separate .R script. That way each user would get a unique markdown report with his\her filtered data. However that was not possible, since the params arg is not specified in the emayili::render wrapper function.
Is there a workaround? Perhaps I could render outside emayili::envelope(), using rmarkdown::render(), and then feed the outputted html(s) files into the emayili::html() function?
I couldn't make that work either.
Thanks, Yoav