Skip to content

spatsoc

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

v0.2.13 · Apr 27, 2026 · GPL-3 | file LICENSE

Description

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.

Downloads

CRAN

558

Last 30 days

6176th

1.4K

Last 90 days

7.9K

Last year

Trend: +6.7% (30d vs prior 30d)

r2u CRAN

14

Last 30 days

36

Last 90 days

112

Last year

Trend: -30% (30d vs prior 30d)

autoCRAN

3

Last 7 days

12

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 30, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Apr 24, 2026
ERROR r-devel-windows-x86_64

examples

Running examples in 'spatsoc-Ex.R' failed
The error most likely occurred in:

> ### Name: group_lines
> ### Title: Group Lines
> ### Aliases: group_lines
> 
> ### ** Examples
> 
> # Load data.table
> library(data.table)

Attaching package: 'data.tabl
...[truncated]...
T[timegroup < 25]
> 
> # Spatial grouping
> group_lines(DT, threshold = 50, projection = utm,
+             id = 'ID', coords = c('X', 'Y'),
+             timegroup = 'timegroup', sortBy = 'datetime')
group column will be overwritten by this function
ERROR r-release-windows-x86_64

examples

Running examples in 'spatsoc-Ex.R' failed
The error most likely occurred in:

> ### Name: group_lines
> ### Title: Group Lines
> ### Aliases: group_lines
> 
> ### ** Examples
> 
> # Load data.table
> library(data.table)
> ## Don't show: 
> data.table
...[truncated]...
T[timegroup < 25]
> 
> # Spatial grouping
> group_lines(DT, threshold = 50, projection = utm,
+             id = 'ID', coords = c('X', 'Y'),
+             timegroup = 'timegroup', sortBy = 'datetime')
group column will be overwritten by this function
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 13, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 30, 2026
ERROR r-release-windows-x86_64

tests

Running 'testthat.R' [29s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(spatsoc)
  Note: spatsoc has been updated to follow the R-spatial evolution. 
  Package dependencies and some functions have
...[truncated]...
ure ('test-time.R:287:3'): group_times nearest hour with minutes threshold ──
  Expected `...[]` to equal 3.
  Differences:
  1/1 mismatches
  [1] 4 - 3 == 1
  
  [ FAIL 2 | WARN 12 | SKIP 0 | PASS 289 ]
  Error:
  ! Test failures.
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies adehabitatHR data.table igraph sf lwgeom CircStats units rlang hwig spatsoc

Version History

13 tracked
updated 0.2.13 ← 0.2.2 diff Apr 27, 2026
new 0.2.2 Mar 10, 2026
updated 0.2.2 ← 0.1.16 diff Sep 6, 2023
updated 0.1.16 ← 0.1.15 diff Feb 23, 2021
updated 0.1.15 ← 0.1.14 diff Oct 20, 2020
updated 0.1.14 ← 0.1.13 diff Jul 3, 2020
updated 0.1.13 ← 0.1.9 diff Mar 27, 2020
updated 0.1.9 ← 0.1.8 diff May 13, 2019
updated 0.1.8 ← 0.1.6 diff Apr 5, 2019
updated 0.1.6 ← 0.1.4 diff Jan 9, 2019
updated 0.1.4 ← 0.1.1 diff Oct 25, 2018
updated 0.1.1 ← 0.1.0 diff Sep 16, 2018
new 0.1.0 Jul 19, 2018