I have 64 different data sets: data 1, data 2, data 3... data 64. I need to calculate the "DTW" distance between each data set and finally get the distance matrix, the code I am using is :
zooData <- zoo(data1$length, data1$Time.Elapsed)
zooData2<-zoo(data2$length,data2$Time.Elapsed)
alignment<-dtw(zooData,zooData2)
alignment$normalizedDistance
In this way, I have to manually change the data set name one by one. The process is super tedious. I am thinking I can use "for loop" to solve this problem, maybe I can put 64 different data sets into a list, and using "for loop"? I am not sure how can I achieve this goal in R. Anyone can help me? Thank you very much!