Append several edge lists
Appends several edge lists created by create_edge_list()
. Merged edges will be ordered and duplicates will be removed.
append_edge_lists(...)
...
: one or several edge lists data.frame
. Outputs of the function create_edge_list()
.A data.frame
with n
rows (where n
is the total number of edges) and the following two columns:
from
: the node label of one of the two endpoints of the edgeto
: the node label of the other endpoint of the edgelibrary("chessboard") # Two-dimensional sampling (only) ---- sites_infos <- expand.grid("transect" = 1:3, "quadrat" = 1:5) nodes <- create_node_labels(data = sites_infos, transect = "transect", quadrat = "quadrat") edges_1 <- create_edge_list(nodes, method = "pawn", directed = TRUE) edges_2 <- create_edge_list(nodes, method = "bishop", directed = TRUE) edges <- append_edge_lists(edges_1, edges_2)