elsasserlab / labcode

Utils to perform frequent data analyses in the lab.
GNU General Public License v3.0
0 stars 1 forks source link

automated templated reports with parameters #38

Closed cnluzon closed 4 years ago

cnluzon commented 4 years ago

This is a stub for setting up templated reports from within the package. The way this works is:

  1. Write a template and put it in inst/packages.
  2. Write the rendering function in templates.R.

Each rendering function is basically a wrapper to:

  1. Retrieve the matching template file.
  2. Pass the parameters to rmarkdown::render.

The wrappers are useful for deployment, since if we change the "official" templates for different ones, function calls to the rendering from outside (for instance, the minute pipeline could be a candidate for this) do not need to change.