Examples for 'stplanr::od_to_odmatrix'


Convert origin-destination data from long to wide format

Aliases: od_to_odmatrix

Keywords:

### ** Examples

od_to_odmatrix(flow)
          E02002361 E02002363 E02002367 E02002371 E02002377 E02002382 E02002393
E02002361       109        38        10        44        34         7        94
E02002363        30       183        11        72        13         8       156
E02002367         5        84        41        66         9         9        88
E02002371        20       110        27       220        58        33       165
E02002377        21        30         7        62       129        53        93
E02002382         8         8        12        36        46        73        94
E02002393        14        14         7        39        35        26       265
od_to_odmatrix(flow[1:9, ])
          E02002361 E02002363 E02002367 E02002371 E02002377 E02002382 E02002393
E02002361       109        38        10        44        34         7        94
E02002363        30       183        NA        NA        NA        NA        NA
od_to_odmatrix(flow[1:9, ], attrib = "Bicycle")
          E02002361 E02002363 E02002367 E02002371 E02002377 E02002382 E02002393
E02002361         2         0         0         3         0         0         0
E02002363         1         5        NA        NA        NA        NA        NA

[Package stplanr version 1.2.2 Index]