dodgr_sample
Sample a random but connected sub-component of a graph
dodgr_sample(graph, nverts = 1000)
graph |
A flat table of graph edges. Must contain columns labelled
|
nverts |
Number of vertices to sample |
A connected sub-component of graph
Graphs may occasionally have nverts + 1
vertices, rather than
the requested nverts
.
graph <- weight_streetnet (hampi) nrow (graph) # 5,742 graph <- dodgr_sample (graph, nverts = 200) nrow (graph) # generally around 400 edges nrow (dodgr_vertices (graph)) # 200
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.