x[i, ..., level, block] x[i, ..., level, block] <- value x[[i, ..., level, block]] x[[i, ..., level, block]] <- value x$i x$i <- value
If level=j is not missing and block=b is not missing, then x[level=j, block=b] returns an object containing all the (j, b) crystal(s). For wavelet packet tables, the object has class "wpt". For cosine packet tables, the object has class "cpt".
Otherwise, if level=j is not missing and length(j)=1, then x[level=j] returns all the crystals in j-th level. For wavelet packet tables, the object has class "wpt". For cosine packet tables, the object has class "block.cpt".
If level=j is not missing and length(j)>1, then x[level=0:j] returns an object of ptable (a subtable of x).
All objects with class "wpt" inherit from classes "wp" and "crystal.list" or "crystal.vector". All objects with class "cpt" inherit from classes "cp" and "crystal.vector". A "block.cpt" object inherits from "cpt".
[[ subscript operator produces an object of class "cp.crystal" or "wp.crystal": x[[level=j, block=b]] returns the (j, b) crystal; x[[i]] and x$i return the i-th crystal.
xx <- make.signal("heavisine") w0 <- wp.table(xx, n.levels=5)w1 <- w0[level=0:3] # subtable of w0 w2 <- w0[level=3, block=5:8] # get w3.5, w3.6, w3.7, w3.0 w3 <- w0[c("s1", "D3", "w2.0", "HLL", "LLL")] # get w1.0 w3.1 w2.0 w3.0 w4 <- w0[[2]] # get wp.crystal w1.0 w5 <- w0[[level=2, block=3]] # get wp.crystal w2.3 w0[abs(w0) < 1] <- 0 # set small coefficients to 0