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.
odmatrix_to_od(odmatrix)
A matrix with row and columns representing origin and destination zone codes and cells representing the flow between these zones.
The function returns a data frame with rows ordered by origin and then destination
zone code values and with names orig
, dest
and flow
.
Other od:
dist_google()
,
od2line()
,
od2odf()
,
od_aggregate_from()
,
od_aggregate_to()
,
od_aggregate()
,
od_coords2line()
,
od_coords()
,
od_dist()
,
od_id
,
od_oneway()
,
od_radiation()
,
od_to_odmatrix()
,
points2flow()
,
points2odf()
,
sp_aggregate()
# NOT RUN {
odmatrix <- od_to_odmatrix(flow)
odmatrix_to_od(odmatrix)
flow[1:9, 1:3]
odmatrix_to_od(od_to_odmatrix(flow[1:9, 1:3]))
# }
Run the code above in your browser using DataLab