Transform a result from dodgr_dists_categorical to summary statistics
Source:R/dists-categorical.R
summary.dodgr_dists_categorical.RdTransform a result from dodgr_dists_categorical to summary statistics
Usage
# S3 method for class 'dodgr_dists_categorical'
summary(object, ...)See also
Other misc:
compare_heaps(),
dodgr_flowmap(),
dodgr_full_cycles(),
dodgr_fundamental_cycles(),
dodgr_insert_vertex(),
dodgr_sample(),
dodgr_sflines_to_poly(),
dodgr_vertices(),
merge_directed_graph(),
write_dodgr_wt_profile()
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