Gathers outputs from all completed stages and renders summary reports in HTML, PDF and/or Excel format.
Usage
pam_report(
cfg,
run_id = cfg$birdnet$run_id,
formats = cfg$report$formats,
output_dir = cfg$paths$reports,
force = FALSE
)Arguments
- cfg
A list from
pam_config_read.- run_id
Character. The detection run to report on. Defaults to
cfg$birdnet$run_id.- formats
Character vector. One or more of
"html","pdf","excel". Defaults tocfg$report$formats.- output_dir
Character. Directory for the output files. Defaults to
cfg$paths$reports.- force
Logical. Overwrite existing reports? Default FALSE.
Details
HTML and PDF are rendered from an R Markdown template using
rmarkdown::render. PDF requires a LaTeX installation
(e.g. tinytex::install_tinytex()). If PDF rendering fails,
a warning is issued and the other formats are still produced.
Excel output is a multi-sheet workbook with one sheet per report
section, created with openxlsx.
Besides recording effort, detections, validation and occupancy, the report
includes species richness and diversity per site (with the species
accumulation curve and the Chao2 estimate), activity patterns (detections
per recorded hour by hour of the day and by week) and the per-species
thresholds saved by pam_species_thresholds(). A section is left out
when its inputs are not available.
Examples
# \donttest{
if (requireNamespace("rmarkdown", quietly = TRUE) && rmarkdown::pandoc_available()) {
ex <- pam_example_project()
res <- suppressMessages(pam_scan_audio(ex$cfg))
proc <- suppressMessages(pam_process_detections(ex$cfg))
occ <- suppressMessages(pam_build_occupancy(ex$cfg))
files <- suppressMessages(pam_report(ex$cfg, formats = "html"))
basename(files)
}
#> [1] "report_run01.html"
# }
