Learn R Programming

swaRmverse

Description

An R package for the comparative analysis of collective motion data in the swarm space. Based on the packages trackdf and swaRm, swaRmverse aims to standardize how data of collective motion are analyzed and support the comparison of properties within and across species and contexts.

swaRmverse is a work in progress, functions are likely to change as the package gets developed.

Publication

Further information on the functionality of the package, along with some use cases, will be soon available in our accompanying publication:

Papadopoulou M, Garnier S, King AJ. swaRmverse: an R package for the comparative analysis of collective motion. Under review.

The swarm space and the included metrics are first described here:

Papadopoulou M., Furtbauer I., O'Bryan L.R., Garnier S., Georgopoulou D.G., Bracken A.M., Christensen C. and King A.J. (2023) Dynamics of collective motion across time and species. Philosophical Transactions of the Royal Society B 378.1874 doi:10.1098/rstb.2022.0068.

Acknowledgements

The development of this package was supported by the 2G-SWARM ONR grant awarded to Dr. Andrew J. King at Swansea University (UK).

Copy Link

Version

Install

install.packages('swaRmverse')

Monthly Downloads

201

Version

0.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marina Papadopoulou

Last Published

October 10th, 2024

Functions in swaRmverse (0.1.1)

do_tsne

Performs t-SNE
event_ids_per_set

Event Indexes per Set
add_set_vels

Add Velocity Timeseries
define_events

Define Events of Collective Motion
do_add_set_vels

Call Add Velocity Timeseries
add_velocities

Add Velocity Timeseries Across Sets
calc_dur_per_event

Duration of Each Event
parAddVelsVerb

Adding Individual Velocity Information in Parallel - Verbose
events_summary

Events Summary
events_n

Number of Events
calc_nn_metrics

Relative Position of Nearest Neighbor Function to Parallelize
do_add_vels

Adding Velocity Information for Individuals in Parallel without Progress Updates
do_pca

Perform PCA
group_metrics

Group Metrics of Collective Motion
get_event_ids

Event Indexes
par_calc_global_metrics

Calculation of Group Metrics in Parallel
pairwise_metrics

Pairwise Metrics of Collective Motion in a Dataset
event_metrics

Metrics of Collective Motion
parAddVels

Adding Motion Properties in Parallel without Progress Updates
set_data_format

Data Formatting
pick_threshold

Pick a Threshold for the Events' Definition
par_nn_metrics

Adding Motion Properties in Parallel - Verbose
col_motion_metrics

Collective Motion Metrics
col_motion_metrics_from_raw

Collective Motion Metrics from Raw Data
expand_pca_swarm_space

Expand Existing Swarm Space (PCA)
nnba

Bearing Angle to Nearest Neighbor
normalize_data

Normalize Data
perIdVels

Speed and Heading Calculation based on swaRm Package.
frontness

Frontness
group_shape

Group Shape Based on a OOBB
group_metrics_per_set

Group Metrics of Collective Motion in a Dataset
swaRmverse

swaRmverse: Swarm Space Creation
swarm_space

Create a Swarm Space
events_dur

Total Duration of All Events
moving_average

Moving Average
multi_species_metrics

Multi-Species Collective Motion Metrics
new_species_metrics

The Collective Motion Metrics of a New Species
nn_metrics

Nearest Neighbour Metrics
multi_species_pca

Multi-Species PCA
multi_species_pca_data

Multi-Species PCA Data
calc_global_metrics

Calculation of Group Metrics
calc_events_averages

Events Averages
calc_n_events

Number of Events (Internal)
add_rel_pos_coords

Relative Position Coordinates
calc_pairwise_metrics

Pairwise Metrics
calc_obb

Minimum Bounding Box