How to do wavelet analysis in R

Hi all,
I'd like to do wavelet analysis for continuous monthly and daily streamflow measurements in R, but I couldn't not find such information. Could you please help me with this? Thanks very much.

Could anyone help to with it? I read the document, but I have not found the dataset which is mentioned in the document to practice with. Thanks very much for your help.wavelets_in_R.pdf (226.0 KB)

I had a look at the examples in the document, and the ones I looked at appeared complete such that they would run if the example code was used.
Have you encountered a specific problem?

I worked from the start of the documents, and could not find the "wt" object. What is the problem? Thanks.

> library(wavelets)
> align(wt, coe=FALSE, inverse=FALSE)
Error in align(wt, coe = FALSE, inverse = FALSE) : object 'wt' not found

The example for align is.

# obtain the two series listed in Percival and Walden (2000), page 42
X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)
# combine them and compute DWT
newX <- cbind(X1,X2)
wt <- dwt(newX, n.levels=3, boundary="reflection", fast=FALSE)
# align
wt.aligned <- align(wt)

data is provided by binding x1 and x2 and then applying dwt to make an example wt object suitable for align()

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.