# NOT RUN {
data(TaiwanAirBox032017)
library(TSclust)
z <- diff(as.matrix(TaiwanAirBox032017[1:50,1:8]))
Macf <- as.matrix(diss(t(z), METHOD = "ACF", lag.max = 5))
sc1 <- hclust(as.dist(Macf), method = "complete")
memb <- cutree(sc1, 1:8)
ngroups <- gap.clus(Macf, memb, 100)
# }
Run the code above in your browser using DataLab