| build {rEMM} | R Documentation |
Building an EMM using New Data
Description
Add new data to an EMM.
Usage
build(x, newdata, ...)
Arguments
x |
an |
newdata |
a vector (one observation), or a matrix or data.frame (each row is an observation) |
... |
further arguments. If |
Details
build() performs clustering and also updates the TRACDS temporal
layer.
NAs are handled in the data by using only the other
dimensions if the data for dissimilarity computation
(see package proxy).
Value
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().
See Also
Class TRACDS,
fade and dist
in proxy.
Examples
## 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)