| as_sfnetwork | R Documentation |
Converts a walk_network object into an sfnetwork from the sfnetworks package
for seamless integration with spatial graph routing and tidygraph analysis workflows.
as_sfnetwork(x, ...)
## S3 method for class 'walk_network'
as_sfnetwork(x, directed = FALSE, ...)
x |
A |
... |
Additional arguments passed to methods. |
directed |
Logical. If |
An sfnetwork object if sfnetworks is installed.
data(streets_cusco)
net <- walk_build_network(streets_cusco, verbose = FALSE)
if (requireNamespace("sfnetworks", quietly = TRUE)) {
sfn <- as_sfnetwork(net)
print(sfn)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.