putC {wavethresh}R Documentation

Put Smoothed Data Into Wavelet Structure

Description

Makes a copy of the wd object, replaces some smoothed data in the copy, and then returns it.

Usage

putC(wd, level, v, boundary=FALSE)

Arguments

wd object of class wd that is to be copied and have smoothed data replaced.
level integer; the level at which the replacement is to take place.
v the replacement data which should be of the correct length.
boundary logical; if FALSE then only the "real" data is replaced (and it is easy to predict the required length of v).
If boundary is TRUE, you can replace the boundary values at a particular level as well (but it is hard to predict the required length of v, and the information has to be obtained from the first.last database component of wd).
boundary has no meaning if wd was obtained with the periodic boundary handling method (bc).

Details

The function accessC obtains the smoothed data for a particular level. This function, putC replaces data at a particular level and returns a modified wd object reflecting the change.

This function is probably not particularly useful, but it is present for completeness. It is required because of the pyramidal nature of the smoothed data points being packed into a vector.

Value

A wd class object containing the replaced data, see wd.object.

RELEASE

Release 2.2 Copyright Guy Nason 1993

See Also

wd.object, accessC

Examples

example(wd)
## Put the numbers 1:64 into level 6
summary(newds <- putC(wds, level=6, v=1:64, boundary=FALSE))
#
# If you look at the C component of new, you will see that
# some numbers have changed at the appropriate position.
all.equal(wds,newds)
##>[1] "Component C: ... difference: 2.1912"

[Package wavethresh version 2.2-9 Index]