Packs input information regarding a discrete wavelet transform into a list.
wavTransform(data, series, n.levels, dictionary, shifted, xform)
a list of vectors containing discrete wavelet transform coefficients.
a numeric vector or signalSeries
object
representing the input series.
an integer denoting the number of decomposition levels.
an object of class wavDictionary
representing
the wavelet dictionary of the transform.
a logical value. If TRUE
, it signifies that the
transform coefficients have already been shifted for approximate zero
phase alignment.
a character string denoting the type of wavelet
transform that has been performed. Typical values are
"modwt"
or "dwt"
.
an object of class wavTransform
.
single level data access.
Usage: x["d2"] or x[2]
Access a subset of wavelet transform crystals.
single level data replacement method.
Usage: x["d2"] <- 1:4
Replace an entire crystal with explicitly defined coefficients.
double level data access.
Usage: x[["d2"]] or x[[2]]
Returns a vector of transform coefficients corresponding to the specified crystal.
transforms the list of wavelet transform coefficients
into a single-column matrix whose row names identify the transform coefficient,
e.g., d4(3) is the third coefficient of the d4
crystal (fourth level
wavelet coefficients).
Usage: as.matrix(x)
plots a boxplot for each crystal in the discrete wavelet transform.
Usage: boxplot(x)
extended data analysis plot. A 2x2 grid of plots containing a stack plot, boxplot, and two energy related plots are shown.
Usage: eda.plot(x)
plot a discrete wavelet transform. Usage: plot(x, type="h", plot.bar=TRUE, plot.pie=TRUE, add=FALSE, cex.main=ifelse1(is.R(),1,0.7), ...)
A wavTransform
object.
A character denoting the type of line
plot to produce in a stack plot of the wavelet transform coefficients
(see primary plot() function for details). If type is the character
string "energy"
an energy plot (bar or pie chart) is produced.
Default: "h"
.
A logical value. If TRUE
and type="energy"
,
a bar plot of crystal energy is plotted. Default: TRUE
.
A logical value. If TRUE
and type="energy"
,
a pie chart of crystal energy is plotted. Default: FALSE
.
A logical value. If TRUE
, the plot is added to the
current plot layout without a frame ejection. Default: FALSE
.
Additional arguments to be sent to the stackplot routine.
print the wavelet transform object. Usage: print(x)
reconstruct/synthesize/invert the wavelet transform. Usage: reconstruct(x)
If the transform coefficients were not modified, the original time series will be returned (+/- some numerical noise).
provide a statistical summary of the wavelet transform object. Usage: z <- summary(x); print(z)
stack plot of the wavelet transform. Usage: wavStackPlot(x)
Used internally by the wavMODWT
and wavDWT
functions
to package the transform contents into a list.
wavDWT
, wavMODWT
, wavDWPT
, wavMODWPT
, wavBoundary
, wavSortCrystals
, wavPacketIndices
, wavShrink
.
# NOT RUN {
## calculate a MODWT of the sunpots series and
## verify the class
W <- wavMODWT(sunspots)
print(class(W))
## summarize the object
summary(W)
## reconstruct the MODWT of the sunspots series
## and compare to the original
sunup <- reconstruct(W)
splus2R::vecnorm(sunup - sunspots)
# }
Run the code above in your browser using DataLab