Warps a supplied vector
time-series or
data.frame
using a warp transformation.
Arguments
- x
vector
time-series ordata.frame
, to be warped- trans
numeric vector
the warp transformation to apply tox
.- ...
Other arguments, currently ignored.
Examples
x <- 1:1000
plot(x, type = "l", main = "Simple Warping")
#transformations < 1 compress time-series
lines(warp(x, 0.5), col = "red")
#transformations > 1 expand time-series
#to expand and the compress, and end at original end value
# mean(transformation) should equal 1
lines(warp(x, c(1.75, 0.25)), col = "blue")
legend(725, 350, c("0.5", "1.75, 0.25"),
col=c("red", "blue"), lty=1, cex=0.75)