# Weighted directed matrix
mat <- matrix(c(
0, 25, 5, 15,
10, 0, 20, 8,
3, 18, 0, 30,
20, 5, 10, 0
), 4, 4, byrow = TRUE,
dimnames = list(c("A", "B", "C", "D"), c("A", "B", "C", "D")))
plot_chord(mat)
plot_chord(mat, chord_alpha = 0.6, ticks = TRUE)
if (requireNamespace("tna", quietly = TRUE)) {
# TNA transition network
model <- tna::tna(tna::group_regulation)
plot_chord(model, ticks = TRUE, segment_width = 0.10)
}
Run the code above in your browser using DataLab