remove | R Documentation |
Remove states/clusters or transitions from an EMM.
remove_clusters(x, to_remove, copy = TRUE)
remove_transitions(x, from, to,copy = TRUE)
remove_selftransitions(x, copy = TRUE)
x |
an |
to_remove |
Names of states/clusters to remove. |
from , to |
Names of states for removing transitions. If |
copy |
logical; make a copy of x before reclustering? Otherwise the function will change |
remove_selftransitions
removes the transitions from each state to itself.
Returns a EMM with removed states/transitions.
If copy=FALSE
a reference to the object x
with the states/transistions removed is returned.
data("EMMTraffic")
emm <- EMM(measure="eJaccard", threshold=0.2)
emm <- build(emm, EMMTraffic)
## remove state 3
emm_rs3 <- remove_clusters(emm, "3")
## remove transition 5->2
emm_rt52 <- remove_transitions(emm, "5", "2")
## compare EMMs
op <- par(mfrow = c(2, 2), pty = "m")
plot(emm, method = "igraph", main = "original EMM")
plot(emm_rs3, method = "igraph", main = "state 3 removed")
plot(emm_rt52, method = "igraph", main = "transition 5->2 removed")
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.