ecohealthalliance / ehastyle

R Markdown templates for EHA documents
8 stars 3 forks source link

Refactor to use officer instead of ReporterRs package #9

Closed noamross closed 6 years ago

noamross commented 6 years ago

The ReporteRs package, which in this package is used for generating specialty Word output, is no longer on CRAN and has been deprecated in favor of officer and . So we need to refactor functions, in particular outbreak_word() to use officer. This will also make it easier to install and faster.

I think almost everything that needs to be replaced is in the postprocessing function in outbreak_word(), which takes the knitted output and makes a fancier word document of it by (1) inserting the document into another document, and (b) adding various metadata and images into the document at the location of bookmarks in the template.. It's possible that the inst/template.docx may also have to be modified if the officer functions are a bit different.

Also the usaid_word() function is a near-clone of outbreak_word() and they could be refactored not to reuse so much code.

noamross commented 6 years ago

Closes via #10