dodgr_sample | R Documentation |
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
.
Other misc:
compare_heaps()
,
dodgr_flowmap()
,
dodgr_full_cycles()
,
dodgr_fundamental_cycles()
,
dodgr_insert_vertex()
,
dodgr_sflines_to_poly()
,
dodgr_vertices()
,
merge_directed_graph()
,
summary.dodgr_dists_categorical()
,
write_dodgr_wt_profile()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.