Remove States/Clusters or Transitions from an EMM
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)
- Names of states/clusters to remove.
- from, to
- Names of states for removing transitions. If
fromhas to contain a matrix with two columns (from and to state names).
- 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.
copy=FALSEa reference to the object
xwith 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 = "graph", main = "original EMM") plot(emm_rs3, method = "graph", main = "state 3 removed") plot(emm_rt52, method = "graph", main = "transition 5->2 removed") par(op)
Looks like there are no examples yet.