Last chance! 50% off unlimited learning
Sale ends in
This function takes a data frame representing travel between origins
(with origin codes in name_orig
, typically the 1st column)
and destinations
(with destination codes in name_dest
, typically the second column) and returns a matrix
with cell values (from attrib
, the third column by default) representing travel between
origins and destinations.
od_to_odmatrix(flow, attrib = 3, name_orig = 1, name_dest = 2)
A data frame representing flows between origin and destinations
A number or character string representing the column containing the attribute data
of interest from the flow
data frame
A number or character string representing the zone of origin
A number or character string representing the zone of destination
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()
,
odmatrix_to_od()
,
points2flow()
,
points2odf()
,
sp_aggregate()
# NOT RUN {
od_to_odmatrix(flow)
od_to_odmatrix(flow[1:9, ])
od_to_odmatrix(flow[1:9, ], attrib = "Bicycle")
# }
Run the code above in your browser using DataLab