Changes the order the nodes are stored in, which is the order plotting functions lay them out in. The network itself is unchanged.
Value
A cograph_network with the nodes in the requested order and
edge indices remapped, or the input format when keep_format = TRUE.
Examples
adj <- matrix(c(0, 1, 1, 1,
1, 0, 1, 0,
1, 1, 0, 0,
1, 0, 0, 0), 4, 4, byrow = TRUE)
rownames(adj) <- colnames(adj) <- c("A", "B", "C", "D")
get_labels(reorder_nodes(adj, order = "degree"))
#> [1] "A" "B" "C" "D"
get_labels(reorder_nodes(adj, order = c("D", "C", "B", "A")))
#> [1] "D" "C" "B" "A"
