Learn R Programming

MotilityLab (version 0.2-5)

timeStep: Compute Time Step of Tracks

Description

Applies a summary statistics on the time intervals between pairs of consecutive positions in a track dataset.

Usage

timeStep(x, FUN = median, na.rm = FALSE)

Arguments

x
the input tracks.
FUN
the summary statistic to be applied.
na.rm
logical, indicates whether to remove missing values before applying FUN.

Value

Summary statistic of the time intervals between two consecutive positions in a track dataset.

Details

Most track quantification depends on the assumption that track positions are recorded at constant time intervals. If this is not the case, then most of the statistics in this package (except for some very simple ones like duration) will not work. In reality, at least small fluctuations of the time steps can be expected. This function provides a means for quality control with respect to the tracking time.

Examples

Run this code
## Show tracking time fluctuations for the T cell data
d <- timeStep( TCells )
plot( sapply( subtracks( TCells, 1 ) , duration ) - d, ylim=c(-d,d) ) 

Run the code above in your browser using DataLab