The Rmarkdown template (src/report.Rmd) contains a section "calculate" which loads CSV files, computes summary dataframes, writes some additional TSV files, and saves its state as an .Rdata file, but does not render plots or user-facing tables on its own. The visual elements are in separate, downstream sections in the Rmd template.
Rmarkdown runs these calculations end-to-end for each output report format (HTML and PDF). To avoid this redundant work and reduce overall runtime by a bit, and for separation of concerns and the convenience of downstream consumers, let's:
Move these calculations to a separate R script that the workflow will run before create_report.R.
Change the scripts to take each file input explicitly, rather than a shared path prefix.
The Rmarkdown template (src/report.Rmd) contains a section "calculate" which loads CSV files, computes summary dataframes, writes some additional TSV files, and saves its state as an
.Rdata
file, but does not render plots or user-facing tables on its own. The visual elements are in separate, downstream sections in the Rmd template.Rmarkdown runs these calculations end-to-end for each output report format (HTML and PDF). To avoid this redundant work and reduce overall runtime by a bit, and for separation of concerns and the convenience of downstream consumers, let's:
create_report.R
.