find_sections: Retrieve track sections based on conditions from multiple...

Description Usage Arguments Details Value Functions Example use case

View source: R/non-dplyr_verbs.R

Description

Similar to filter, but does not filter on each table seperately, but filters frames for which all conditions from seperate tables apply. That is, one can filter frames based on a variable in e.g. the tr table and tr, soc and group will be filtered for the frames where that condition is TRUE.

Usage

1
2
3
find_sections(tracks, ..., tol = 1, pad = 0, add_times = TRUE)

find_sections_(tracks, ..., tol = 1, pad = 0, add_times = TRUE, .dots)

Arguments

tracks

A tracks object.

...

Conditions.

tol

Combine sequences that are tol frames apart.

pad

Add padding of this many frames around each section. This allows for capturing context around sections of interest.

add_times

When TRUE, three columns will be added to the sections table that give human readable times, instead of only frame numbers.

.dots

Used to work around non-standard evaluation. See vignette("nse") for details.

Details

It returns a list with tracks tables as well as a summary table of sequences. The first is named tracks, tables are grouped appropriately. The second list enty is named sections and provides an overview of the track sections that were found. It is grouped by trial, with a start, stop and length column.

The function supports a tolerance level which allows for combining sequences that are close together.

Any variables used as conditions will be looked up in the tr, soc and group tables and applied when present.

Value

A tbl_df.

Functions

Example use case

If one wants to select all sequences of frames where animals are chasing each other (to plot them, for example), one could filter for a high mean speed of the pair, and a small pairwise distance.


Ax3man/trackr documentation built on Oct. 8, 2019, 10:53 p.m.