Converts flattened wavelet packet node indices to corresponding level and oscillation indices.
1  wavPacketIndices(x, check.basis=TRUE)

x 
a vector of flattened wavelet packet node indices. 
check.basis 
a logical value. If 
In general, wavelet packet crystals can be arranged in the socalled natural order ala W(0,0) , W(1,0), W(1,1), W(2,0), W(2,1), W(2,2), W(2,3), ... , W(J,0), ..., W(J, NJ) where J is the number of decomposition levels and NJ. By definition, W(0,0) is the original time series. A given crystal is identified in the W(j,n) form above or by a flattened index. For example, the DWPT crystal in level 2 at oscillation index 1 is identified either by j,n=2,1 or by its flattened index 4 (with zero based indexing, 4 represents the fifth crystal of the wavelet packet transform in natural order). This function converts such flattened wavelet packet indices to the W(j,n) form.
a list of flat
, level
, and osc
vectors containing the flattened, decomposition level,
and oscillation indices, respectively, corresponding to the input.
1 2 3 4 5  ## specify a basis formed by the flattened indices
## corresponding to the wavelet packet nodes
## W(2,0:1) and W(3,4:7), but submit them in
## arbitrary order
wavPacketIndices(c(14,11,12,13,4,3), check.basis=TRUE)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.