Learn R Programming

wavethresh (version 2.2-6)

putC: 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 i

Value

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

RELEASE

Release 2.2 Copyright Guy Nason 1993

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.

See Also

wd.object, accessC

Examples

Run this code
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"

Run the code above in your browser using DataLab