Warps a supplied vector
time-series or
data.frame
using a warp transformation.
warp(x, trans = 1, ...)
x
warped, by default a data.frame
.
warp
s are not conservative.
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 then 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)