as_tbl_graph.Rd
Convert to tidygraph.
# S3 method for SC as_tbl_graph(x, ...) # S3 method for sf as_tbl_graph(x, ...)
x | model |
---|---|
... | other args |
library(tidygraph)#> #>#>#> #>#>#> #>#> # A tbl_graph: 14 nodes and 15 edges #> # #> # A directed acyclic simple graph with 2 components #> # #> # Node Data: 14 x 3 (active) #> name x y #> <chr> <dbl> <dbl> #> 1 XRU8YK 0 0 #> 2 928B7q 0 1 #> 3 NImOuE 0.75 1 #> 4 0vYu6o 0.5 0.7 #> 5 NZChxy 0.69 0 #> 6 VSspSp 0.2 0.2 #> # ... with 8 more rows #> # #> # Edge Data: 15 x 3 #> from to edge_ #> <int> <int> <chr> #> 1 1 2 ZuKcx8 #> 2 2 3 LpKNkJ #> 3 3 12 zzwqw7 #> # ... with 12 more rowslibrary(silicate) umodel <- SC(as_tbl_graph(minimal_mesh)) #gibble.PATH <- function(x, ...) { #inner_join(x[["path"]], x[["path_link_vertex"]] %>% group_by(path) %>% summarize(nrow = n()) ) %>% # dplyr::mutate(ncol = 2, type = "MULTILINESTRING") #} #library(gibble) #geomap <- gibble(prim %>% PATH()) #silicate:::build_sf() ## some kind of round trip