R/compare_plot_report_generic.R
create_comparison_plot_report.Rd
Given two directories with analogous plots, a comparison plot report is created. The comparison plot report shows pairs of analogous plots side-by-side in the report. Analogous plots can be plots of the same quantities at different time points. Analogous plots are identified by the same name of the plot file. Plots in the directory ps_current_dir are shown on the right-hand side and plots from the directory ps_previous_dir are shown on the left-hand side.
create_comparison_plot_report(
ps_right_dir,
ps_left_dir,
ps_tmpl_path = system.file("templates",
"generic_comparison_plot_report.Rmd.template", package = "qgert"),
ps_diagram_na_path = system.file("templates", "Diagram_NA.pdf", package = "qgert"),
ps_report_text = NULL,
pl_repl_value = NULL,
ps_out_path = "generic_comparison_plot_report.Rmd",
pb_keep_src = FALSE,
pb_session_info = FALSE,
pb_force = FALSE,
pb_debug = FALSE,
plogger = NULL
)
directory of plots shown on the right-hand-side in the report
directory of plots shown on the left-hand-side in the report
path to Rmd template file
path to diagram to be included to stand for missing diagram
Report text
list of replacement values for placeholders
Path to report putput file
flag to keep source files
add session info to report
overwrite existing report, if it exists
flag to add debugging info
log4r logger object
The report generator starts by retrieving all plot files from ps_current_dir and from ps_previous_dir. Then it determines the intersection between the file-names and the two difference sets. In loops over all the sets, the plots are integrated into the report.
if (FALSE) {
dir1 <- system.file("extdata", "curgel", package = "qgert")
dir2 <- system.file("extdata", "prevpath", package = "qgert")
create_comparison_plot_report(ps_right_dir = dir1, ps_left_dir = dir2)
}