build | R Documentation |
Add new data to an EMM.
build(x, newdata, ...)
x |
an |
newdata |
a vector (one observation), or a matrix or data.frame (each row is an observation) |
... |
further arguments. If |
build()
performs clustering and also updates the TRACDS temporal
layer.
NA
s are handled in the data by using only the other
dimensions if the data for dissimilarity computation
(see package proxy).
A reference to the changed EMM 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
and dist
in proxy.
## load EMMTraffic data
data("EMMTraffic")
EMMTraffic
## create EMM
emm <- EMM(measure="eJaccard", threshold=0.2)
## build model using EMMTraffic data (note that the EMM object is
## changed without assignment!)
build(emm, EMMTraffic)
## same as: emm <- build(emm, EMMTraffic)
size(emm)
plot(emm)
## emm2 <- emm does not create a copy (just a reference)
## a "deep" copy is created using copy()
emm2<- copy(emm)
## convert the emm into a graph
as.igraph(emm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.