[R] wavethresh and multiresolutional decomposition (mallat)

Koen Hufkens koen.hufkens at telenet.be
Tue Nov 8 16:15:03 CET 2005

Hi list,

I'm trying to calculate and playing around with multiresolutional 
decomposition (MRD, Mallat 1989) using wavelets and the wavethresh3 
package. Therefor I should "clear" all the unwanted wavelet coefficient 
data from the wavelet coefficient matrix/vector? that's produced by 
wavethresh3 and the imwd() command.

All data can be called for with waveletcoeff$wXLY where X and Y are the 
level and the direction (horizontal, vertical, diagonal) in 2d wavelet 

waveletcoeff$wXLY <- 0 will clear the vector and replace it with just 
one 0 giving strange results when using the inverse wavelet transform.

So I was thinking of exporting waveletcoeff$wXLY to some variable, and 
clearing it

somelevel <- waveletcoeff$wXLY
somelevel[1:n,] <- 0
decomposition$wXLY <- somelevel

But this gives as strange a result as just setting everything to 0 in 
the first place.

So if anyone has any clues to how to do this and how to calculate the 
MRD using R in general?


More information about the R-help mailing list