remove

0th

Percentile

Remove States/Clusters or Transitions from an EMM

Remove states/clusters or transitions from an EMM.

Keywords
manip
Usage
remove_clusters(x, to_remove, copy = TRUE) remove_transitions(x, from, to,copy = TRUE) remove_selftransitions(x, copy = TRUE)
Arguments
x
an EMM object.
to_remove
Names of states/clusters to remove.
from, to
Names of states for removing transitions. If to is missing from has to contain a matrix with two columns (from and to state names).
copy
logical; make a copy of x before reclustering? Otherwise the function will change x!
Details

remove_selftransitions removes the transitions from each state to itself.

Value

Returns a EMM with removed states/transitions. If copy=FALSE a reference to the object x with the states/transistions removed is returned.

Aliases
  • remove_clusters
  • remove_clusters,EMM,character-method
  • remove_transitions
  • remove_transitions,EMM,character,character-method
  • remove_transitions,EMM,matrix,missing-method
  • remove_selftransitions
  • remove_selftransitions,EMM-method
Examples
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)
Documentation reproduced from package rEMM, version 1.0-11, License: GPL-2

Community examples

Looks like there are no examples yet.