Reorders the rows of a data frame to align with the specific ordering of points along the edges of a metric graph's mesh. This ensures that data associated with locations on the graph are correctly aligned with the graph's internal mesh structure, which is essential for spatial operations and visualizations.
Arguments
- graph
A metric graph object with a mesh component containing VtE.
- data
A data.frame to be reordered. It must contain columns for edge numbers and distances along those edges.
- edge_col
Character. Name of the column in
datathat contains the edge numbers. Default: ".edge_number".- dist_col
Character. Name of the column in
datathat contains the distance along the edge for each point. Default: ".distance_on_edge".
