trxfriends: Track social interaction annotator

Description Usage Arguments Details Value

Description

Calculates closest other fly for each fly and timepoint. Currently obscenely slow.

Usage

1

Arguments

trx

a track data frame

Details

The function loops through each frame, calculates an (n x n-1) distance matrix and looks for value and index of minima. There may be slightly more efficient ways of doing this.

Value

A data frame containing, for each fly (id) and timepoint (time), the distance (closest) and identity (bff) of the closest conspecific.


PaolaCognigni/CTraxHelper documentation built on May 7, 2019, 11:57 p.m.