Breaking changes:
get_geometry default for “output_crs” changed to NULL,
to leave input coordinates in original crs by default (PR 132)distance_to_centroid
changed from FALSE to TRUEgroup_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:
calc_centroid function in and provide
geometry interface for centroid_group,
centroid_dyad and centroid_fusion (PR 127)
calc_centroid efficiency by quickly
returning coordinates/geometry if length is 1, and using mean instead of
sf::st_centroid where appropriatecentroid_dyad and centroid_fusion to use a
shared internal functioncalc_direction function in and provide
geometry interface for direction_step,
direction_to_centroid, direction_to_leader and
edge_direction (PR 125)calc_distance function in and provide
geometry interface for group_pts, edge_nn,
edge_dist, distance_to_centroid and
distance_to_leader (PR 128)
leader_direction_group (PR 125)direction_group (PR 133)edge_alignment returns units output (PR 141)Vignettes:
fusion_id example to using distance based edge-list
generating functions vignetteDocumentation: * update package title and description to include mention of intragroup social dynamics * fix missing vignette in _pkgdown.yml PR 139
Fixes:
edge_direction bug if geometry in both edges and DT
(PR 136)edge_alignment
(PR 141)New experimental functions:
get_geometry helper function for setting up an input DT
with a sfc geometry column (PR 117)calc_distance function for geometry interface
(see https://github.com/ropensci/spatsoc/issues/116) (PR 122)calc_distance function for geometry interface
(see https://github.com/ropensci/spatsoc/issues/116) (PR 123)calc_centroid function for geometry interface
(see https://github.com/ropensci/spatsoc/issues/116) (PR 124)Fixes:
assert_* family of internal functions for
checking arguments, returning {rlang} errors (PR 121New experimental functions:
edge_direction function for calculating the direction
between individuals (PR 80)edge_zones function for calculating behavioural zones
(PR 112)Fixes:
centroid_dyad and centroid_fusion
return NA for centroids when dyadID / fusionID are NA (PR 114)Maintenance:
\code{}) with Markdown throughout package, and using
consistent language across man pages (#94, PR 113)New experimental function:
edge_alignment function for calculating directional
alignment (PR
111)Fixes:
Breaking changes:
edge_delay , since order
of individuals ID1/ID2 should not influence results (PR 106)New experimental function:
leader_edge_delay function for calculating leadership
with the directional correlation delay (PR 96)Fixes:
New experimental function:
edge_delay function for calculating the directional
correlation delay (PR 70)Fixes:
direction_step (PR 92)New experimental functions:
leader_direction_group function for calculating
leadership defined as position within a spatiotemporal group along the
mean direction of movement (PR 66)direction_to_leader function for calculating the
direction to the leader of each spatiotemporal group identified by
leader_direction_group (PR 68)distance_to_leader function for calculating the
distance to the leader of each spatiotemporal group identified by
leader_direction_group (PR 68)Fixes:
New experimental functions:
direction_polarization function for calculating
polarization of individual directions within spatiotemporal groups (PR 76)direction_group function for calculating mean group
direction (PR
91)direction_to_centroid function for calculating
direction in radians from each individual’s position in a spatiotemporal
group and the group’s centroid, distance_to_centroid
function for calculation the distance (and rank distance) from each
individual’s position in a spatiotemporal group and the group’s centroid
(PR 74)direction_step function for calculating direction in
radians between each location (PR 90)New experimental functions:
centroid_fusion function for calculation fusion
centroids (PR
89)centroid_group function for calculating group centroids
(PR 72))New experimental function:
fusion_id function for flexibly identifying
fission-fusion events (PR 78)fusion_id with tests for expected
number of output fusionIDs (PR 83)sf, units instead
of rgeos and spbuild_lines now returns an sf LINESTRING
objectbuild_polys now returns an sf
POLYGON/MULTIPOLYGON objectgroup_lines now accepts an input sf
LINESTRING object (argument “sfLines”) and internally uses
sf::st_intersects, sf::st_buffer, etc instead
of rgeos functionsgroup_polys now accepts an input sf
POLYGON/MULTIPOLYGON object (argument “sfPolys”) and internally uses
sf::st_intersects, sf::st_area, etc instead of
rgeos functions. group_polys now returns area
and proportion of overlap when area = TRUE with respective
units using the units packagespatsoc + targets
workflow examplegroup_polys
from alphanumeric to spaces in input DT’s id columngroup_pts,
edge_nn and edge_dist (PR 46)edge_dist to handle threshold =
NULL. If NULL, edge_dist will return all neighbours
observed (eg. useful if one wanted to calculated mean nearest neighbour
distance at each timegroup).dyad_id function for generating dyad IDs with
edge functions (PR
27)edge_dist,
edge_nn and dyad_id functions here
(PR 14)data.table error in edge_dist and
edge_nn (PR 25)group_pts, edge_dist and edge_nn
(PR 24)SIMPLIFY=FALSE in SNA vignette.edge_nn (PR 11)edge_dist (PR 11)pkgdown URL (PR 1)build_polys or group_polys(!3)get_gbi to generate group by individual matrices
for better integrating spatsoc in social network analysis
workflows (!2)iterations = 1, randomizations no longer
returns the DT with appended columns. Regardless of the value of
iterations, randomizations always returns observed rows
followed by randomized rows in a long data.table (!1).build_lines ordering bug to ensure rows are
ordered by date time when building linesgroup_timesgroup_pts,
group_lines, group_polysrandomizationsbuild_lines,
build_polys