Skip to content

spatsoc

0.2.13Package record

Group Animal Relocation Data by Spatial and Temporal Relationship and Measure Intragroup Social Dynamics

1packages depend
6.3Kdownloads / year
99.4%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.2.13

Breaking changes:

  • get_geometry default for "output_crs" changed to NULL, to leave input coordinates

in original crs by default (PR 132)

  • default for "return_rank" in distance_to_centroid changed from FALSE to TRUE
  • group_pts now returns NA if coords / geometry are NA (part of (PR 128)
  • fusion_id now also checks future timegroup with shift(type = 'lead')

whereas previous versions only checked lag timegroups and lead+lag spatial

distance (PR 142, PR 144)

Enhancements:

  • use new internal calc_centroid function 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_centroid efficiency 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_dyad and

centroid_fusion to use a shared internal function

  • use new internal calc_direction function in and provide geometry interface for

direction_step, direction_to_centroid, direction_to_leader and

edge_direction (PR 125)

  • use new internal calc_distance function 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_alignment returns 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_id example 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_direction bug 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

CRAN checks
13OK
Slowest check: 8.3 min · r-release-macos-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 0.2.13
README· In the repository, left out of the releaseVignettesYes · 6 · dynamicNEWSYes · 100% structured · mentions 0.2.13Citation fileYes · cites a publicationWebsiteYes · pkgdown
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

6.3K
CRAN downloads in the past year
Rank #7,190 · ~17/day · ~529/mo
Daily download trend is not available in this view yet.
47030 days
1.2K90 days
6.3K1 year
Compare downloads with other packages →
Also on98 r2u91 c2d4u

Repository

25Stars
3Forks
5Open issues
2Open PRs
30Releases
3,174Commits
4Commit identities
rspatialsocialgpsanimalnetworkr-packagerstats
License file reads as GPL-3.0 · 3,174 commits · Last activity 2026-10-20 · 0% stars, 30d
Responsiveness
How these are sampled
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

2023-05-01 · 242026-07-07 · 25
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conduct (inherited from ropensci)Contributing guide
Docs source (2)
README.Rmdpkgdown
Coverage (1)
Coverage reporting
Show all practicesHide 4 practices
Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Research and citation (2)
CITATION.cffcodemeta.json
Lint, format, editor (2)
AirRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 3.4
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (3)
Author, Maintainer since 0.1.0 (2018)
Releases (12)

Pick two releases to compare their code metrics.

  • 0.2.13Latest
    record
    2026-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
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.2.2
    record
    2023-09-07 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.16
    record
    2021-02-24 · diff ↗
  • 0.1.15
    record
    2020-10-21 · diff ↗
  • unarchivedReturned to CRAN
    2020-07-04
  • 0.1.14
    record
    2020-07-04 · diff ↗
  • archivedRemoved from CRAN
    2020-06-28
    check problems were not corrected in time
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.13
    record
    2020-03-28 · diff ↗ ·
    added 1 export
    dyad_id
  • 0.1.9
    record
    2019-05-14 · diff ↗
Show 7 earlier eventsHide 7 earlier events
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1.8
    record
    2019-04-06 · diff ↗ ·
    added 2 exports
    edge_dist, edge_nn
  • 0.1.6
    record
    2019-01-10 · diff ↗
  • 0.1.4
    record
    2018-10-26 · diff ↗ ·
    added 1 export
    get_gbi
  • 0.1.1
    record
    2018-09-17 · diff ↗
  • 0.1.0
    record
    2018-07-20
  • R
    R 3.5.0 released · 2018-04-23

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for spatsoc version 0.2.13 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy