## Create three sample time series
x <- cumsum(rnorm(50))
y <- cumsum(rnorm(50))
z <- sin(seq(0, pi, length.out=50))
## Compute the distance and check for coherent results
diss.SPEC.LLR(x, y, plot=TRUE)
diss.SPEC.LLR(x, z)
diss.SPEC.LLR(y, z)
#create a dist object for its use with clustering functions like pam or hclust
proxy::dist( rbind(x,y,z), method=diss.SPEC.LLR, meth="LK")
Run the code above in your browser using DataLab