accessC(wdobj, level=wdobj$levels, boundary=F)
For decomposition, the top level contains the original data, and subsequent lower levels contain the successively smoothed data. So if there are 2^m original data points, there will be m+1 levels indexed 0,1,...,m. So
> accessC.wd(wdobj, level=m)pulls out the original data, as does
> accessC.wd(wdobj)
To get hold of lower levels just specify the level that you're interested in, e.g.
> accessC.wd(wdobj, level=2)gets hold of the second level.
For reconstruction, the top level contains the ultimate step in the Mallat pyramid reconstruction algorithm, lower levels are intermediate steps.
The need for this function is a consequence of the pyramidal structure of Mallat's algorithm and the memory efficiency gain achieved by storing the pyramid as a linear vector. AccessC obtains information about where the smoothed data appears from the fl.dbase component of an wd object, in particular the array
fl.dbase$first.last.cwhich gives a complete specification of index numbers and offsets for
wd.object$C.
Note that this function is method for the generic function accessC. When the wd object is definitely a wd class object then you only need use the generic version of this function.
Note also that this function only gets information from wd class objects. To insert coefficients into wd objects you have to use the putC function (or more precisely, the putC.wd method).
Nason, G. P. and Silverman, B. W. (1994). The discrete wavelet transform in S. Journal of Computational and Graphical Statistics, 3, 163--191.
# # Get the 3rd level of smoothed data from a decomposition # > accessC(wd(data), level=3) # # Plot the time series from a reconstruction # > tsplot(accessC(reconstruction))