Allows the user to extract or replace parts of a
molecule 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
"molecule".
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
molecule.
VALUE:
x[i] returns an object of the same class as
x with
length(i) components
(stored as a vector of length
length(i));
x[[i]]
returns an atom object.
SEE ALSO:
,
,
.
EXAMPLES:
xx <- make.signal("mishmash1")
zz <- top.atoms(wpt(xx, basis="best.basis", n.levels=4))
par(mfrow=c(1,2))
plot(zz) # plot top 50 coefficients from the best.basis
z1 <- zz[1:10]
plot(z1) # plot the first 10 coefficients
z2 <- zz[[7]] # get the 7-th atom, w4.0.11