| as_tidygraph | R Documentation |
Converts a walk_network object into a tbl_graph from the tidygraph package.
as_tidygraph(x, ...)
## S3 method for class 'walk_network'
as_tidygraph(x, directed = FALSE, ...)
x |
A |
... |
Additional arguments passed to methods. |
directed |
Logical. If |
A tbl_graph object if tidygraph is installed.
data(streets_cusco)
net <- walk_build_network(streets_cusco, verbose = FALSE)
if (requireNamespace("tidygraph", quietly = TRUE)) {
tg <- as_tidygraph(net)
print(tg)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.