odmatrix_to_od: Convert origin-destination data from wide to long format
Description
This function takes a matrix representing travel between origins
(with origin codes in the rownames of the matrix)
and destinations
(with destination codes in the colnames of the matrix)
and returns a data frame representing origin-destination pairs.
Usage
odmatrix_to_od(odmatrix)
Arguments
odmatrix
A matrix with row and columns representing origin and destination zone codes
and cells representing the flow between these zones.
Details
The function returns a data frame with rows ordered by origin and then destination
zone code values and with names orig, dest and flow.