Converts a spatial adjacency matrix to an edge list data frame. Useful for integration with graph-based methods.
adj_to_edgelist(adj_matrix, directed = FALSE)Data frame with columns:
from: Source node name
to: Target node name
weight: Edge weight (if not binary)
Square adjacency matrix.
Logical. If FALSE (default), only return unique undirected edges.