Could anyone suggest why the following example code does not work:
require(biwavelet)
t <- seq(1/24, 365, 1/24)
A <- 2
fs <- 1/24
y <- A + sin(2*pi*fs*t)
d = cbind(t,y)
wt.t1 <- wt(d)
plot(wt.t1)
It generates an error stating:
Error in image.default(x$t, yvals, t(zvals), zlim = zlims, ylim = rev(range(yvals)), :
invalid z limits
How would I fix this problem?
Additional:
In response to Gavin Simpsons answer: If I keep the data to only include one frequency but alter the time vector, the code works fine.
require(biwavelet)
A <- 2
fs <- 1/24
y <- A + sin(2*pi*fs*t)
d <- cbind(seq(1,8760), y)
wt.t1 <- wt(d)
plot(wt.t1)