# Sample data
data(uciCT)
# Obtain an average for the first 5 time series
dtw.avg <- DBA(CharTraj[1:5], CharTraj[[1]], trace = TRUE)
plot(dtw.avg, type="l")
# Change the provided order
dtw.avg2 <- DBA(CharTraj[5:1], CharTraj[[1]], trace = TRUE)
# Same result?
all(dtw.avg == dtw.avg2)
Run the code above in your browser using DataLab