sf2igraph | R Documentation |
Convert sf lines to an igraph object
sf2igraph(sf_lines, tolerance = 1)
sf_lines |
sf lines object |
tolerance |
numeric snapping distance for lines to be considered connected |
tree <- create_reversed_tree(15) tree_sf <- igraph2sf(tree) tree <- sf2igraph(tree_sf, tolerance = 1) ## Not run: data(nhd_sub) tree <- sf2igraph(nhd_sub) plot(tree$tree, edge.width = tree$weights, layout = igraph::layout_as_tree(tree$tree, mode = "in")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.