Create transition network
rn_transition(
phaseSequence,
threshold = NA,
doMatrixPlot = TRUE,
doNetworkPlot = TRUE,
excludeOther = FALSE,
excludeNorec = TRUE,
returnGraph = FALSE
)
A vector with names or numbers that represent a sequence of phases or order parameter dynamics. If a named numeric vector is passed, the names attribute will be used to represent the phases. If the variable phase_name
, generated by rn_phases is used, the arguments excludeOther
and excludeNorec
wil be evaluated.
Provide a threshold for the relative frequencies. Values below the threshold will be set to 0
. Pass NA
to not use a threshold (default = NA
)
default(TRUE
)
default(TRUE
)
Should the phase "Other" be excluded from plots? (default = FALSE
)
Should the category "No recurrence" be excluded from plots? (default = TRUE
)
Return an igraph::igraph()
object (default = FALSE
)
A transition matrix based on relative frequencies
# This will output the transition matrix, a plot of the matrix and a transition network plot.
y <- c("Happy", "Happy", "Sad", "Neutral", "Neutral", "Angry", "Sad", "Sad", "Neutral")
TM <- rn_transition(y)