Converts a spatial adjacency matrix to an edge list data frame.
Useful for integration with graph-based methods.
Usage
adj_to_edgelist(adj_matrix, directed = FALSE)
Arguments
- adj_matrix
Square adjacency matrix.
- directed
Logical. If FALSE (default), only return unique undirected edges.
Value
Data frame with columns: