List node pairs
Create the list of all node pairs
listNodePairs(n, directed = TRUE)
n
: Total number of nodesdirected
: Boolean for directed (TRUE) or undirected (FALSE) caseMatrix with two columns which lists all the possible node pairs. Each row is a node pair.
# List all the node pairs with 10 nodes, for directed and undirected graphs n <- 10 listNodePairs(n, TRUE) listNodePairs(n, FALSE)