Skip to contents

Transform a result from dodgr_dists_categorical to summary statistics

Usage

# S3 method for class 'dodgr_dists_categorical'
summary(object, ...)

Arguments

object

A 'dodgr_dists_categorical' object

...

Extra parameters currently not used

Value

The summary statistics (invisibly)

Examples

# Prepare a graph for categorical routing by including an "edge_type" column
graph <- weight_streetnet (hampi, wt_profile = "foot")
graph <- graph [graph$component == 1, ]
graph$edge_type <- graph$highway
# Define start and end points for categorical distances; using all vertices
# here.
length (unique (graph$edge_type)) # Number of categories
#> [1] 8
v <- dodgr_vertices (graph)
from <- to <- v$id [1:100]
d <- dodgr_dists_categorical (graph, from, to)
# Internal 'summary' method to summarise results:
summary (d)
#> Proportional distances along each kind of edge:
#>   path: 0.8941
#>   primary: 0
#>   residential: 0
#>   secondary: 0.0159
#>   service: 0.0572
#>   steps: 0
#>   track: 0
#>   unclassified: 0.0328