Learn R Programming

camtrapR

camtrapR is a package for camera trap data management in R.

Features

  • Data management — Build record tables from raw camera trap images/videos using EXIF metadata
  • Data import — Import data from external platforms (Wildlife Insights, Camtrap DP, csv files)
  • Survey dashboardsurveyDashboard() provides a code-free graphical user interface for data exploration and occupancy modelling
  • Activity patterns — Kernel density estimation and comparison of temporal activity
  • Occupancy models — Prepare and run single-species and Bayesian community occupancy models (via unmarked, ubms, JAGS or NIMBLE)
  • Spatial capture-recapture — Generate input for SCR analyses (with the secr package)
  • Spatial covariates — Extract environmental covariates and predict species occupancy across space
  • Visualisation — Maps, activity plots, and survey summary figures

Installation

Install the release version from CRAN:

install.packages("camtrapR")

Install the GitHub master version:

# install.packages("remotes")
# install.packages("R.rsp")
remotes::install_github("jniedballa/camtrapR", build_vignettes = TRUE)

Install the GitHub development version (most recent changes and new features):

remotes::install_github("jniedballa/camtrapR", ref = "dev", build_vignettes = TRUE)

Note: For installation from GitHub, package R.rsp is required. build_vignettes = TRUE is necessary due to the use of static vignettes.

You can also install a specific previous version (e.g., if a recent update broke code you need):

remotes::install_version(package = "camtrapR", version = "3.0.1")

Exiftool

Many camtrapR functions read EXIF metadata from JPG images and videos via Exiftool, a free and open-source tool by Phil Harvey (available for Windows, macOS, and Linux).

To make full use of camtrapR, you will need Exiftool on your system. See the installation instructions in vignette 1 and the Exiftool website.

If you only use camtrapR to create model input from existing record tables (without working with raw image files), Exiftool is not required.

Vignettes

camtrapR includes six vignettes covering the entire workflow:

  1. Camera trap data management
  2. Species and individual identification
  3. Record tables and model input
  4. Maps, species activity and reports
  5. Community Occupancy models
  6. Sample data sets and the surveyDashboard()

Browse them online at https://cran.r-project.org/package=camtrapR or locally after installation with browseVignettes("camtrapR").

Help and Support

Further reading

Niedballa, J., Sollmann, R., Courtiol, A., Wilting, A. (2016). camtrapR: an R package for efficient camera trap data management. Methods in Ecology and Evolution, 7(12), 1457–1462. https://doi.org/10.1111/2041-210X.12600

Niedballa, J., Sollmann, R., Wilting, A. (2025) The camtrapR R package: From data management to interactive ecological analysis of camera trap data. bioRxiv 2025.09.26.678697; doi: https://doi.org/10.1101/2025.09.26.678697

Citation

To cite camtrapR in publications, please use:

Niedballa, J., Sollmann, R., Courtiol, A., Wilting, A. (2016). camtrapR: an R package for efficient camera trap data management. Methods in Ecology and Evolution 7(12), 1457–1462. https://doi.org/10.1111/2041-210X.12600

or run citation("camtrapR") in R.

License

camtrapR is released under the GPL-2 license.

Copy Link

Version

Install

install.packages('camtrapR')

Monthly Downloads

987

Version

3.1.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Juergen Niedballa

Last Published

July 28th, 2026

Functions in camtrapR (3.1.0)

camtrapR-package

Overview of the functions in the camtrapR package
cameraOperation

Create a camera trap station operation matrix
checkSpeciesNames

Check species names against the ITIS taxonomic database
communityModel

Create a community occupancy model for JAGS or Nimble
checkSpeciesIdentification

Consistency check on species image identification
appendSpeciesNames

Add or remove species names from JPEG image filenames
createCovariates

Extract covariate values from spatial rasters and prepare rasters for spatial predictions
camtrapsMultiSeason

Sample multi-season camera trap station information
camtraps

Sample camera trap station information
commOccu-class

commOccu objects
dplyr_reconstruct.records

Wrapper to discard class in dplyr
filterRecordTable

Filter species record table for temporal independence
detectionHistory

Species detection histories for occupancy analyses
fit,commOccu-method

Fit a community occupancy model
createStationFolders

Create camera trap station directories for raw camera trap images
createSpeciesFolders

Create species directories for species identification
exifTagNames

Show Exif metadata of JPEG images or other image or video formats
getSpeciesImages

Collect all images of a species
fixDateTimeOriginal

Fix DateTimeOriginal Exif metadata tag in Reconyx Hyperfire cameras
print.camOp

Printing method for camera trap station operation matrix
predict,commOccu-method

Predictions from community occupancy models
detectionMaps

Generate maps of observed species richness and species presences by station
print.detHist

Printing method for detection history
print.records

Printing method for record tables
print.cams

Printing method for camera table objects
print.cams_dp

Printing method for Camtrap DP objects
plot_coef,commOccu-method

Plot effect sizes of covariates in community occupancy model
plot.camOp

Plotting method for camera trap station operation matrix
imageRename

Copy and rename images based on camera trap station ID and creation date
plot_effects,commOccu-method

Plot Marginal Effects of Covariates
readCamtrapDP

Convert Camtrap DP format data to camtrapR format
recordTableIndividualSample

Sample single-species record table with custom metadata from camera trap images
simulateCamtrapData

Simulate Camera Trapping Data
recordTable

Generate a species record table from camera trap images and videos
spatialDetectionHistory

Generate a capthist object for spatial capture-recapture analyses from camera-trapping data
recordTableIndividual

Generate a single-species record table with individual identification from camera trap images or videos
recordTableIndividualSampleMultiSeason

Sample single-species multi-season record table with custom metadata from camera trap images
recordTableSample

Sample species record table from camera trap images
recordTableSampleMultiSeason

Sample multi-season species record table from camera trap images
readWildlifeInsights

Import Wildlife Insights data to camtrapR
summary,commOccu-method

Summarize community occupancy model
[.camOp

Subsetting method for camera trap station operation matrices
surveyReport

Create a report about a camera trapping survey and species detections
timeShiftImages

Apply time shifts to JPEG image metadata
summary.camOp

Summary method for camera trap station operation matrices
surveyDashboard

Survey Dashboard for Camera Trap Data Analysis
speciesAccum

Species Accumulation Curves for Camera Trap Data
[.records

Subsetting method for record tables
summary.records

Summary method for record tables
[.detHist

Subsetting method for detection history
writeDateTimeOriginal

Write values to DateTimeOriginal tag in image metadata
timeShiftTable

Sample camera trap time shift table
activityDensity

Plot kernel density estimation of single-species activity
addToPath

Add a directory to PATH temporarily
PPC.community

Calculate Community-Level Posterior Predictive Checks for Occupancy Models
addCopyrightTag

Write a copyright tag into JPEG image metadata
OCRdataFields

Optical character recognition (OCR) from data fields in digital images
PPC.residuals

Calculate Residuals from MCMC Output of Occupancy Models
activityOverlap

Plot overlapping kernel densities of two-species activities
aggregateStations

Aggregate Camera Trap Table to Station Level
activityHistogram

Plot histogram of single-species activity
activityRadial

Radial plots of single-species activity