subtracks: Decompose Track(s) into Subtracks

Description Usage Arguments Details Value

View source: R/functions.R

Description

Creates a tracks object consisting of all subtracks of 'x' with 'i' segments (i.e., 'i'+1 positions).

Usage

1
subtracks(x, i, overlap = i - 1)

Arguments

x

a single track or a tracks object.

i

subtrack length. A single integer, lists are not supported.

overlap

the number of segments in which each subtrack shall overlap with the previous and next subtrack. The default i - 1 returns all subtracks. Can be negative, which means that space will be left between subtracks.

Details

The output is always a single tracks object, which is convenient for many common analyses. If subtracks are to be considered separately for each track, use the function staggered together with lapply. Subtrack extraction always starts at the first position of the input track.

Value

A tracks object is returned which contains all the subtracks of any track in the input tracks object that consist of exactly 'i' segments and overlap adjacent subtracks in 'overlap' segments.


jtextor/MotilityLab documentation built on May 20, 2019, 3:13 a.m.