dodgr_sample {dodgr} | R Documentation |
Sample a random but connected sub-component of a graph
Description
Sample a random but connected sub-component of a graph
Usage
dodgr_sample(graph, nverts = 1000)
Arguments
graph |
A flat table of graph edges. Must contain columns labelled
|
nverts |
Number of vertices to sample |
Value
A connected sub-component of graph
Note
Graphs may occasionally have nverts + 1
vertices, rather than
the requested nverts
.
See Also
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()
Examples
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
[Package dodgr version 0.4.1 Index]