convert.wd {wavethresh} | R Documentation

## Convert a non-decimated wd object into a wst object.

### Description

Convert a time-ordered non-decimated wavelet transform object into a packet-ordered non-decimated wavelet transform object.

### Usage

    convert.wd(wd, ...)

### Arguments

`wd` | The `wd` class object that you wish to convert.
`...` | any other arguments

### Details

In WaveThresh3 a non-decimated wavelet transform can be ordered in two different ways: as a time-ordered or packet-ordered representation. The coefficients in the two objects are exactly the same it is just their internal representation and ordering which is different. The two different representations are useful in different situations. The packet-ordering is useful for curve estimation applications and the time-ordering is useful for time series applications.

See Nason, Sapatinas and Sawczenko, 1998 for further details on ordering and weaving.

Note that the input object must be of the non-decimated type. In other words the type component of the input object must BE "`station`". Once the input object has been converted the output can be used with any of the functions suitable for the `wst.object`.

The `getarrvec` function actually computes the permutation to weave coefficients from one ordering to another.

### Value

An object of class `wst` containing exactly the same information as the input object but ordered differently as a packet-ordered object.

### RELEASE

Version 3.6 Copyright Guy Nason 1997

### See Also

`convert`, `getarrvec`, `wd`, `wd.object`, `wst`, `wst.object`.

### Examples

    #
    # Generate a sequence of 32 random normals (say) and take their
    # this-is-escaped-code{
    #
    #myrand <- wd(rnorm(32), type="station")
    #
    # Print out the result (to verify the class and type of the object)
    #
    #myrand
    #Class 'wd' : Discrete Wavelet Transform Object:
    #       ~~  : List with 8 components with names
    #              C D nlevels fl.dbase filter type bc date
    #
    #$ C and $ D are LONG coefficient vectors !
    #
    #Created on : Tue Sep 29 12:17:53 1998
    #Type of decomposition:  station
    #
    #summary(.):
    #----------
    #Levels:  5
    #Length of original:  32
    #Filter was:  Daub cmpct on least asymm N=10
    #Boundary handling:  periodic
    #Transform type:  station
    #Date:  Tue Sep 29 12:17:53 1998
    #
    # Yep, the myrand object is of class: this-is-escaped-codenormal-bracket41bracket-normal.
    #
    # Now let's convert it to class this-is-escaped-codenormal-bracket43bracket-normal. The object
    # gets returned and, as usual in S, is printed.
    #
    #convert(myrand)
    #Class 'wst' : Stationary Wavelet Transform Object:
    #       ~~~  : List with 5 components with names
    #              wp Carray nlevels filter date
    #
    #$wp and $Carray are the coefficient matrices
    #
    #Created on : Tue Sep 29 12:17:53 1998
    #
    #summary(.):
    #----------
    #Levels:  5
    #Length of original:  32
    #Filter was:  Daub cmpct on least asymm N=10
    #Date:  Tue Sep 29 12:17:53 1998
    #
    # Yes. The returned object is of class this-is-escaped-codenormal-bracket45bracket-normal.
    # I.e. it has been converted successfully.

[Package wavethresh version 4.0-2 Index]