Subscript a Decomposition

DESCRIPTION:

Allows the user to extract or replace parts of a decompose object by using packet names or subscripts.

USAGE:

x[i] 
x[i] <- value 
x[[i]] 
x[[i]] <- value 

REQUIRED ARGUMENTS:

x
an object inheriting from class decompose.
i
a vector of crystal names, positive integers or logical flags. For [[, i must be an integer or a crystal name.

OPTIONAL ARGUMENTS:

value
replacement value for the relevant piece of the decompose.

VALUE:

x[i] returns an object of the same class as x with length(i) components (stored as a matrix of length(i) columns); x[[i]] returns the i-th component of the decomposition with the same attributes as the original signal.

BUGS:

When plotting a decompose object, the first subplot is always "Data" which is reconstructed from the decomposition components. The label "Data" may not be appropriate for decompose objects created from a subscript operation.

SEE ALSO:

EXAMPLES:

xx <- make.signal("doppler") 
dd <- decompose(block.cpt(xx, n.levels=3)) 
par(mfrow=c(2,2)) 
plot(dd)                  # plot all components 
d1 <- dd[1:4] 
plot(d1)                  # plot the first 4 components 
d2 <- dd[[7]] 
plot(d2, type="l")        # plot the 7th component C3.0