Launch an interactive Shiny interface for configuring and generating
camtrapReport outputs from an existing camReport
object.
Arguments
- object
- launch.browser
A logical value (default
TRUE) indicating whether the application is opened in the default web browser.- max_upload_mb
A numeric value (default
2000) giving the maximum file-upload size in megabytes.- ...
Additional arguments passed to
shiny::runApp().
Details
The function starts a Shiny-based graphical user interface for editing report metadata, selecting report sections, defining focus groups, and generating data-status or ecological reports.
The GUI can be used with an existing camReport object and provides an
interactive alternative to configuring reports directly in R.
Choose an existing output directory explicitly before loading ZIP data or
saving output. ZIP data are extracted there so saved objects retain their
source paths across R sessions.
Existing report, R Markdown, and saved-object files are protected unless
the overwrite checkbox is selected. Generating output does not change the
R working directory. On local Windows sessions, Browse opens R's native
folder chooser; manual path entry remains available on every platform.
The Sections tab edits the loaded source narrative without evaluating its
placeholders or replacing code-generated content. Reset restores the text
present when the dataset was loaded into the GUI. Save the current object
as RDS to retain edits to included sections. Excluded sections retain their
edits only for the current GUI session. Focus-group choices come from the data;
missing taxonomy is explained without automatically contacting GBIF.
ZIP imports have a separate, initially unchecked permission to overwrite an
existing extraction directory; see camData() for its location and limits.
GBIF taxonomy enrichment is also initially unchecked. Selecting it permits
sending scientific names to GBIF when importing fresh data with taxize
installed. Loading an existing processed-object cache does not enrich it.
Examples
if (FALSE) { # interactive() && identical(Sys.getenv("CAMTRAPREPORT_RUN_GUI_EXAMPLE"), "true")
# Set CAMTRAPREPORT_RUN_GUI_EXAMPLE=true deliberately to launch this example.
source_dataset <- system.file(
"external",
"dataset",
package = "camtrapReport"
)
example_dataset <- tempfile("camtrapReport-example-")
dir.create(example_dataset)
invisible(file.copy(
list.files(source_dataset, full.names = TRUE),
example_dataset,
recursive = TRUE
))
cm <- camData(example_dataset)
gui(cm)
unlink(example_dataset, recursive = TRUE, force = TRUE)
}
