Spatially Explicit Capture-Recapture
Overview
Functions to estimate the density and size of a spatially distributed animal population sampled with an array of passive detectors, such as traps, or by searching polygons or transects. Models incorporating distance-dependent detection are fitted by maximizing the likelihood. Tools are included for data manipulation and model selection.
New features or changed behaviour of old functions
- improved telemetry-calibrated cue count model (telemetrytype 'marking'), developed with assistance from Claude (Anthropic); uses Tu unmarked counts only, models unidentified marked sightings Tm (pID estimated), and allows a density model and finite-mixture models with known classes (hcov)
- derived() returns Dcw, the cue-weighted mean density
- capthist attribute 'marked' has individual telemetry availability per occasion (new functions marked(), marked<-)
- details$telemetryint = "GH" uses Gauss-Hermite quadrature for activity centres
- addTelemetry() help page describes telemetry type 'marking'
- details$chatmethod = "analytic" option for overdispersion of unmarked sightings
- details safeLL and uselog now default to TRUE when the capthist includes telemetry
Show all changes in 5.5.1Hide the rest of the changes in 5.5.1
Bugs fixed
- specifying fixed 'pmix' parameter of h2 finite mixture model applied one value to both classes, i.e. (p,p), now (1-p,p)
- mixture models failed or gave wrong class weights when detector 1 was not in use on occasion 1
Other
- tests for telemetrytype 'marking'
- faster compilation: specific Boost distribution headers
From NEWS in the release
Install
Health
- OK13 OK2026-10-14
- NOTE12 OK, 1 NOTE2026-07-11
- OK13 OK2026-05-20
- ERROR12 OK, 1 ERROR2026-05-19
- OK12 OK2026-04-25
Show 2 earlier changesHide 2 earlier changes
- ERROR11 OK, 2 NOTE, 1 ERROR2026-03-30
- WARNING10 OK, 3 NOTE, 1 WARNING2026-03-10
Documentation
- Help pages
- 176includes a package overview page
- Examples that run
- 72%114 run in a plain check (2 of them under a condition) · 5 only when donttest examples are enabled (R CMD check --as-cran) · 38 never run · 2 hold no code
- Exported functions with examples
- 93%
- Documented parameters
- 97%
- Return-value docs
- 97%
- Help pages citing references
- 46%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- 2
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
2 development-tooling and community-health practices detected across 1 family in the upstream repository
Checks run against github.com/murrayefford/secr on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-06-23Named in .Rbuildignore: .claudeCommits: at least 23 crediting it in the message
- Claude Sonnet 5.523 commits · Oct 2026
Dependencies
Installing secr adds 27 packages (22 with compiled code, 55 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, sf 9.3 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 5.5.1Latest
- 5.4.3
- RR 4.6.0 released · 2026-04-24
- 5.4.22026-02-24 · diff ↗
- 5.4.12026-01-11 · diff ↗
- 5.3.0
- 5.2.4
- RR 4.5.0 released · 2025-04-11
- 5.2.1
- 5.2.0
- 5.1.0
- 5.0.02024-10-02 · diff ↗ ·
removed 3 exports
derivedSystematic, esa.plot.secr, fxi.secradded 11 exports
MCgof, masksize, fxi, fxTotal, fxiContour, fxiMode, pdotContour, bufferContour, esaPlot, boundarytoSF, Dfn2 - 4.6.102024-08-22 · diff ↗
- 4.6.92024-06-29 · diff ↗
- 4.6.7
- RR 4.4.0 released · 2024-04-24
Show 92 earlier eventsHide 92 earlier events
- 4.6.6
- 4.6.5
- 4.6.4
- 4.6.12023-07-11 · diff ↗
- 4.6.0
- RR 4.3.0 released · 2023-04-21
- 4.5.10
- 4.5.8
- 4.5.7
- 4.5.62022-08-15 · diff ↗
- 4.5.5
- 4.5.4
- RR 4.2.0 released · 2022-04-22
- 4.5.32022-02-14 · diff ↗
- 4.5.12022-01-18 · diff ↗
- 4.5.0
- 4.4.82021-11-09 · diff ↗
- 4.4.72021-10-18 · diff ↗
- 4.4.5
- 4.4.4
- RR 4.1.0 released · 2021-05-18
- 4.4.1
- 4.3.32020-12-11 · diff ↗
- 4.3.1
- 4.3.02020-07-14 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 4.2.22020-04-09 · diff ↗
- 4.2.0
- 4.1.0
- 4.0.2
- 3.2.12019-06-03 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 3.2.0
- 3.1.82018-11-19 · diff ↗
- 3.1.72018-10-04 · diff ↗
- 3.1.6
- RR 3.5.0 released · 2018-04-23
- 3.1.52018-02-25 · diff ↗ ·
removed 1 export
LLsurface.secradded 6 exports
insertdim, LLsurface, intervals, intervals<-, sessionlabels, sessionlabels<- - 3.1.32017-12-03 · diff ↗ ·
removed 5 exports
derived.cluster, derived.session, derived.mash, derived.external, derived.njadded 5 exports
derivedCluster, derivedSession, derivedMash, derivedExternal, derivednj - 3.1.0
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 3.0.32013-10-30 · diff ↗
- 3.0.22013-06-28 · diff ↗
- 3.0.12017-05-03 · diff ↗ ·
added 10 exports
as.mask, telemetrytype, Tn, sightingPlot, occasionKey, telemetrytype<-, Tn<-, telemetryxy<-, updateCH, shareFactorLevels - RR 3.0.0 released · 2013-04-03
- 2.15.32013-01-24 · diff ↗
- 2.15.12012-05-15 · diff ↗
- RR 2.15.0 released · 2012-03-30
- 2.14.1
- RR 2.14.0 released · 2011-10-31
- 2.14.0
- 2.13.12011-06-17 · diff ↗
- RR 2.13.0 released · 2011-04-13
- 2.12.22011-02-21 · diff ↗
- 2.12.12010-12-02 · diff ↗ ·
removed 1 export
searcharea<-added 12 exports
esa.plot, esa.plot.secr, suggest.buffer, bias.D, mask.check, polyarea, pdot.contour, buffer.contour, detectpar, ms, spacing, spacing<- - RR 2.12.0 released · 2010-10-15
- 2.12.0
- 2.11.12010-05-07 · diff ↗
- RR 2.11.0 released · 2010-04-22
- 2.11.02010-03-11 · diff ↗
- 2.10.42016-12-04 · diff ↗
- 2.10.3
- 2.10.22016-01-09 · diff ↗
- 2.10.02015-12-07 · diff ↗ ·
added 10 exports
addSightings, markocc, Tu, Tm, sighting, discretize, markocc<-, Tu<-, Tm<-, pmixProfileLL - 2.9.52015-06-16 · diff ↗
- 2.9.4
- 2.9.32015-01-11 · diff ↗
- 2.9.22014-11-26 · diff ↗
- 2.9.1
- 2.9.02014-09-22 · diff ↗ ·
added 7 exports
fx.total, strip.legend, sim.detect, secr.test, getMeanSD, maskarea, masklength - 2.8.22014-04-30 · diff ↗
- 2.8.12014-04-03 · diff ↗
- 2.8.02014-03-31 · diff ↗ ·
added 14 exports
par.secr.fit, par.derived, par.region.N, ellipse.bvn, clone, telemetryxy, telemetered, PG, Rsurface, CV, CVa, CVa0, plotMCP, xy2CH - 2.7.02013-10-30 · diff ↗
- 2.6.1
- 2.6.02013-06-12 · diff ↗
- 2.5.0
- 2.4.02012-11-05 · diff ↗ ·
added 7 exports
addTelemetry, make.telemetry, timevaryingcov, signalframe, signalmatrix, timevaryingcov<-, signalframe<- - 2.3.2
- 2.3.12011-12-20 · diff ↗
- 2.3.02011-11-20 · diff ↗ ·
added 6 exports
tile, addCovariates, pointsInPolygon, predictDsurface, rectangularMask, spotHeight - 2.2.02011-10-02 · diff ↗
- 2.1.02011-06-17 · diff ↗ ·
removed 1 export
empirical.varDadded 22 exports
region.N, expected.n, trap.builder, make.systematic, writeGPS, mash, cluster.counts, cluster.centres, circular.r, circular.p, derived.cluster, derived.session, derived.mash, derived.external, derived.nj, clusterID, clustertrap, alongtransect, unmarked, clusterID<-, clustertrap<-, unmarked<- - 2.0.0
- 1.5.12010-12-03 · diff ↗
- 1.4.12010-08-30 · diff ↗
- 1.4.02010-05-07 · diff ↗ ·
removed 1 export
read.capturesadded 9 exports
read.capthist, MMDM, ARL, write.captures, closure.test, closedN, read.SPACECAP, write.SPACECAP, logmultinom - 1.3.02010-03-11
- RR 2.10.0 released · 2009-10-26
Package metadata
- First published
- 2010-03-11
- Total releases
- 88 / 16 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 126 KB / 11 files
- Download size
- 1.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("secr")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.