interpolateTrack: Interpolate Track Positions

Description Usage Arguments Examples

Description

Approximates the track positions at given time points using linear interpolation (via the approx function).

Usage

1
interpolateTrack(x, t, how = "linear")

Arguments

x

the input track (a matrix or data frame).

t

the times at which to approximate track positions. These must lie within the interval spanned by the track timepoints.

how

specifies how to perform the interpolation. Possible values are "linear" (which uses approx with default values) and "spline" (which uses spline with default values).

Examples

1
2
3
4
5
## Compare interpolated and non-interpolated versions of a track
bb <- boundingBox( TCells[2] )
plot( TCells[2] )
t2i <- interpolateTrack(TCells[[2]], seq(bb[1,"t"],bb[2,"t"],length.out=100),"spline")
plot( tracks( t2i ), add=TRUE, col=2 )

MotilityLab documentation built on May 2, 2019, 8:31 a.m.