Learn R Programming

⚠️There's a newer version (0.1.1) of this package.Take me there.

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. In prep.

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.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Marina Papadopoulou

Last Published

March 26th, 2024

Functions in swaRmverse (0.1.0)

event_metrics

Metrics of Collective Motion
group_metrics_per_set

Group Metrics of Collective Motion in a Dataset
events_dur

Total Duration of All Events
events_summary

Events Summary
par_calc_global_metrics

Calculation of Group Metrics in Parallel
events_n

Number of Events
moving_average

Moving Average
get_event_ids

Event Indexes
event_ids_per_set

Event Indexes per Set
multi_species_metrics

Multi-Species Collective Motion Metrics
multi_species_pca

Multi-Species PCA
parAddVelsVerb

Adding Individual Velocity Information in Parallel - Verbose
multi_species_pca_data

Multi-Species PCA Data
nn_metrics

Nearest Neighbour Metrics
swaRmverse

swaRmverse: Swarm Space Creation
group_metrics

Group Metrics of Collective Motion
set_data_format

Data Formatting
new_species_metrics

The Collective Motion Metrics of a New Species
pick_threshold

Pick a Threshold for the Events' Definition
pairwise_metrics

Pairwise Metrics of Collective Motion in a Dataset
swarm_space

Create a Swarm Space
frontness

Frontness
parAddVels

Adding Motion Properties in Parallel without Progress Updates
group_shape

Group Shape Based on a OOBB
nnba

Bearing Angle to Nearest Neighbor
normalize_data

Normalize Data
perIdVels

Speed and Heading Calculation based on swaRm Package.
par_nn_metrics

Adding Motion Properties in Parallel - Verbose
add_rel_pos_coords

Relative Position Coordinates
add_set_vels

Add Velocity Timeseries
calc_dur_per_event

Duration of Each Event
add_velocities

Add Velocity Timeseries Across Sets
calc_n_events

Number of Events (Internal)
calc_nn_metrics

Relative Position of Nearest Neighbor Function to Parallelize
calc_events_averages

Events Averages
do_tsne

Performs t-SNE
calc_global_metrics

Calculation of Group Metrics
calc_obb

Minimum Bounding Box
col_motion_metrics

Collective Motion Metrics
do_pca

Perform PCA
do_add_vels

Adding Velocity Information for Individuals in Parallel without Progress Updates
expand_pca_swarm_space

Expand Existing Swarm Space (PCA)
define_events

Define Events of Collective Motion
calc_pairwise_metrics

Pairwise Metrics
do_add_set_vels

Call Add Velocity Timeseries
col_motion_metrics_from_raw

Collective Motion Metrics from Raw Data