update | R Documentation |
Add a sequence of new state assignments to a TRACDS object.
## S4 method for signature 'TRACDS'
update(object, newdata, verbose=FALSE, ...)
reset(x)
compact(x)
x , object |
a |
newdata |
a vector with a state assignemnt sequence (typically produced by clustering). |
verbose |
logical; verbose output? |
... |
further arguments. |
update()
adds a new state assignemnt sequenc to the TRACDS object by increasing the
transition counts and, if needed, creating new states.
reset()
resets the current state to NA
for reading in a
new sequence. An NA
in newdata
also resets the current state.
compact()
reduces the size (memory) used to store the temporal
transition matrix.
A reference to the changed TRACDS object with the data added.
Note: EMM objects store all variable data in an environment which
enables us to update partial data without copying the whole object. Assignment
will not create a copy! Use the provided method copy()
.
Class TRACDS
,
fade
.
## create an empty TRACDS object
tracds <- TRACDS()
tracds
## update with an cluster assignment sequence
update(tracds, c(1,2,5,5,2))
tracds
plot(tracds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.