Puts the lowest id node among every dyad as source (and the other as target)
switch.edges(edges)
edges | A matrix or data frame structured as a list of edges |
---|
A list containing two data frames.
edge.list
transforms the input into a two-elements list containing a
dataframe of nodes (with columns “id” and “label”) and a
dataframe of edges. The last one is numeric (with columns “source”
and “target”) and based on auto-generated nodes' ids.
Other manipulation:
check.dpl.edges()
George Vega Yon
#> [,1] [,2] #> [1,] 1 2 #> [2,] 1 3 #> [3,] 3 1 #> [4,] 4 2 #> [5,] 2 4 #> [6,] 5 1 #> [7,] 6 1switch.edges(relations)#> source target #> 1 1 2 #> 2 1 3 #> 3 1 3 #> 4 2 4 #> 5 2 4 #> 6 1 5 #> 7 1 6