Group Animal Relocation Data by Spatial and Temporal Relationship and Measure Intragroup Social Dynamics
Overview
Detects spatial and temporal groups in GPS relocations (Robitaille et al. (2019) doi:10.1111/2041-210X.13215). It can be used to convert GPS relocations to gambit-of-the-group format to build proximity-based social networks, and perform data-stream randomization methods suitable for GPS data. Also provides measures of intragroup social dynamics including distance and direction to leaders, centroids and nearest neighbours.
Breaking changes:
get_geometrydefault for "output_crs" changed to NULL, to leave input coordinates
in original crs by default (PR 132)
- default for "return_rank" in
distance_to_centroidchanged from FALSE to TRUE group_ptsnow returns NA if coords / geometry are NA (part of (PR 128)fusion_idnow also checks future timegroup withshift(type = 'lead')
whereas previous versions only checked lag timegroups and lead+lag spatial
Enhancements:
- use new internal
calc_centroidfunction in and provide geometry interface for
centroid_group, centroid_dyad and centroid_fusion
(PR 127)
Show all changes in 0.2.13Hide the rest of the changes in 0.2.13
- improves internal
calc_centroidefficiency by quickly returning
coordinates/geometry if length is 1, and using mean instead of sf::st_centroid
where appropriate
- reduce repeated source code and testing by refactoring
centroid_dyadand
centroid_fusion to use a shared internal function
- use new internal
calc_directionfunction in and provide geometry interface for
direction_step, direction_to_centroid, direction_to_leader and
edge_direction (PR 125)
- use new internal
calc_distancefunction in and provide geometry interface for
group_pts, edge_nn, edge_dist, distance_to_centroid and
distance_to_leader (PR 128)
- location data can be in longlat provided a crs is provided with coordinates
or geometry has crs set
- previous distance measurement methods are retained to preserve backwards
compatibility if crs is NULL
- add geometry interface and ensure coordinates/geometry are planar for
leader_direction_group (PR 125)
- improve speed of
direction_group
(PR 133)
- remove requirement on 'dyadID' for edge_direction (PR 137)
edge_alignmentreturns units output (PR 141)
Vignettes:
- add geometry interface and spatial measures vignette
(PR 119)
- add toc and links to other vignettes in all vignettes
- add
fusion_idexample to using distance based edge-list generating functions
vignette
- rename "additional data formats" vignette to "interspecific interactions" (PR 148)
Documentation:
- update package title and description to include mention of intragroup social dynamics
- fix missing vignette in _pkgdown.yml PR 139
Fixes:
- fix
edge_directionbug if geometry in both edges and DT (PR 136) - fix missing return units in output from
edge_alignment(PR 141) - fix reduce example runtimes (PR 150, PR 151)
- fix remove remotes: lwgeom and adds s2 to suggests (PR 146)
- fix CI error on macos (PR 140)
- fix speed direction_polarization (PR 134)
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-04-30
- ERROR12 OK, 2 ERROR2026-04-24
- OK14 OK2026-04-13
Show 2 earlier changesHide 2 earlier changes
- ERROR13 OK, 1 ERROR2026-03-30
- OK14 OK2026-03-10
Documentation
- Help pages
- 35 (5 internal)includes a package overview page
- Examples that run
- 100%34 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 43%
Downloads
Repository
- PRs merged (all time)
- 97%
- Median days to close, 50 most recently updated closed issues
- 76
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
13 development-tooling and community-health practices detected across 8 families in the upstream repository
Checks run against github.com/ropensci/spatsoc on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 4 practices
Dependencies
Installing spatsoc adds 28 packages (22 with compiled code, 42 MB of source tarballs). Heaviest: sf 9.3 MB, data.table 5.7 MB, igraph 4.8 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.2.13Latest2026-04-27 · current release · diff ↗ ·
added 18 exports
centroid_dyad, centroid_fusion, centroid_group, direction_group, direction_polarization, direction_step, direction_to_centroid, direction_to_leader, distance_to_centroid, distance_to_leader, edge_alignment, edge_delay, edge_direction, edge_zones, fusion_id, get_geometry, leader_direction_group, leader_edge_delay - RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.2.22023-09-07 · diff ↗
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.1.162021-02-24 · diff ↗
- 0.1.152020-10-21 · diff ↗
- unarchivedReturned to CRAN2020-07-04
- 0.1.142020-07-04 · diff ↗
- archivedRemoved from CRAN2020-06-28check problems were not corrected in time
- RR 4.0.0 released · 2020-04-24
- 0.1.13
- 0.1.92019-05-14 · diff ↗
Show 7 earlier eventsHide 7 earlier events
Package metadata
- First published
- 2018-07-20
- Total releases
- 12 / 8 yrs
- License
- GPL-3 | file LICENSE OSI
- Minimum R
- ≥ 3.4
- Download size
- 963 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("spatsoc")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1111/2041-210x.13215.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.