Calculates closest other fly for each fly and timepoint. Currently obscenely slow.
a track data frame
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.
A data frame containing, for each fly (
id) and timepoint (
the distance (
closest) and identity (
bff) of the closest conspecific.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.