ptw (version 1.9-15)

warp.time: Transform time according to a given warping function

Description

Warp time points according to a warping function.

Usage

warp.time(tp, coef)

Arguments

tp

A vector of time points, not necessarily equidistant.

coef

The coefficients of the parametric time warping function: the first coefficient is the constant shift, the second the linear stretch etcetera.

Value

The function returns a vector of warped time points.

References

Wehrens, R. et al. (2015) "Fast parametric warping of peak lists", Bioinformatics. DOI: 10.1093/bioinformatics/btv299.

Examples

Run this code
# NOT RUN {
time <- 1:100
## simple shift and compression
warp.time(time, c(-10, .99))
# }

Run the code above in your browser using DataLab