[R] wavethresh: length must be power of two
Oscar Perpiñan Lamigueiro
oscar.perpinan at upm.es
Tue Mar 9 12:00:43 CET 2010
I am using the 4.2 version of the wavethresh package available from here: http://www.stats.bris.ac.uk/~wavethresh/ trying to follow the book of Nason (http://www.springer.com/978-0-387-75960-9).
I am interested in the analysis of several years time series of daily data with wavelets methods. But the functions of this package only accept data whose lengths are power of two, even for non-decimated DWT.
> wdS <- wd(data, type="station")
Error en wd(data, type = "station") : Data length is not power of two
A possible solution is to analyse a window with a length power of two. For this example:
> wdS2 <- wd(data2, type="station")
or pad with zeros:
Is there any other solution?
By the way, does anybody knows why the wavethresh package at CRAN is not being updated?
Thank you very much!
Oscar Perpiñán Lamigueiro
Department of Electrical Engineering
Universidad Politécnica de Madrid
More information about the R-help