# NOT RUN {
old.par <- par(no.readonly=TRUE)
t <- (-100:100)
y <- sin(t*2*pi)+sin(t*2*pi/4)+sin(t*2*pi/8)+sin(t*2*pi/16)+sin(t*2*pi/32)+sin(t*2*pi/64)
x1 <- sin(t*2*pi/8)
x2 <- sin(t*2*pi/16)
x3 <- sin(t*2*pi/32)
x4 <- sin(t*2*pi/64)
y <- cbind(t,y)
x <- cbind(t,x1,x2,x3,x4)
## n-dimensional multiple wavelet coherence
result <- vwc(y, x, nrands = 10)
# }
# NOT RUN {
result <- vwc(y, x)
# }
# NOT RUN {
## Plot wavelet coherence and make room to the right for the color bar
## Note: plot function can be used instead of plot.vectorwavelet
par(oma = c(0, 0, 0, 1), mar = c(5, 4, 4, 5) + 0.1, pin = c(3,3))
plot.vectorwavelet(result, plot.cb = TRUE, main = "Plot n-dimensional vwc (n=5)")
par(old.par)
# }
Run the code above in your browser using DataLab