putD.wp {wavethresh} | R Documentation

## Puts a whole resolution level of wavelet packet coeffients into wp wavelet object.

### Description

Makes a copy of the `wp` object, replaces a whole resolution level of wavelet packet coefficients data in the copy, and then returns the copy.

### Usage

    putD.wp(wp, level, value, ...)

### Arguments

`wp` | Wavelet packet object into which you wish to insert the wavelet packet coefficients.
`level` | the resolution level at which you wish to replace the wavelet packet coefficients.
`value` | the replacement data, this should be of the correct length.
`...` | any other arguments

### Details

The function `accessD.wp` obtains the wavelet packet coefficients for a particular level.

For wavelet packet transforms the number of coefficients at each resolution level is the same and equal to `2^nlevels` where `nlevels` is the number of levels in the `wp.object`. The number of coefficients at each resolution level is also, of course, the number of data points used to initially form the `wp` object in the first place.

Use the `accessD.wp` to extract whole resolution levels of wavelet packet coefficients.

We don't recommend that you use this function unless you really know what you are doing. Usually it is more convenient to manipulate individual packets of coefficients using `getpacket`/`putpacket` functions. If you must use this function to insert whole resolution levels of coefficients you must ensure that the data vector you supply is valid: i.e. contains packet coefficients in the right order.

### Value

A `wp` class object containing the modified wavelet packet coefficients.

### RELEASE

Version 3.5.3 Copyright Guy Nason 1994

### See Also

`wp.object`, `wp`, `accessD`, `accessD.wp`, `getpacket.wp`, `putpacket.wp`.

### Examples

    #
    # Generate an EMPTY wp object:
    #
    #zero <- rep(0, 16)
    #zerowp <- wp(zero)
    #
    # Put some random mother wavelet coefficients into the object at
    # resolution level 2. For the wavelet packet transform there
    # are always 16 coefficients at every resolution level.
    #
    #mod.zerowp <- putD( zerowp, level=2, v=rnorm(16))
    #
    # If you plot mod.zerowp you will see that there are only
    # coefficients at resolution level 2 where you just put the coefficients.

[Package wavethresh version 4.0-2 Index]