do_pca: Perform PCA

View source: R/swarm_space.R

do_pcaR Documentation

Perform PCA

Description

This function runs a PCA to place events on collective motion into less-dimentional space.

Usage

do_pca(df)

Arguments

df

A dataframe with the metrics of collective motion per event.

Value

a list with the swarm space (a dataframe with PC1, PC2, PC3 coordinates per event) and the complete pca object.

Author(s)

Marina Papadopoulou m.papadopoulou.rug@gmail.com


swaRmverse documentation built on Oct. 10, 2024, 5:08 p.m.