# simulates an example time series and estimates its trend and evolutionary wavelet spectrum
spec <- wavethresh::cns(512)
spec <- wavethresh::putD(spec, level = 8, 1 + sin(seq(from = 0, to = 2 * pi, length = 512))^2)
trend <- seq(from = 0, to = 5, length = 512)
set.seed(1)
x <- TLSWsim(trend = trend, spec = spec)
x.TLSW <- TLSW(x)
print(x.TLSW)
Run the code above in your browser using DataLab