dodgr_save_streetnet | R Documentation |
The weight_streetnet function returns a single data.frame
object,
the processing of which also relies on a couple of cached lookup-tables to
match edges in the data.frame
to objects in the original input data. It
automatically calculates and caches a contracted version of the same graph,
to enable rapid conversion between contracted and uncontracted forms. This
function saves all of these items in a single .Rds
file, so that a the
result of a weight_streetnet call can be rapidly loaded into a
workspace in subsequent sessions, rather than re-calculating the entire
weighted network.
dodgr_save_streetnet(net, filename = NULL)
net |
|
filename |
Name with optional full path of file in which to save the
input |
This may take some time if dodgr_cache_off has been called. The contracted version of the graph is also saved, and so must be calculated if it has not previously been automatically cached.
Other cache:
clear_dodgr_cache()
,
dodgr_cache_off()
,
dodgr_cache_on()
,
dodgr_load_streetnet()
net <- weight_streetnet (hampi)
f <- file.path (tempdir (), "streetnet.Rds")
dodgr_save_streetnet (net, f)
clear_dodgr_cache () # rm cached objects from tempdir
# at some later time, or in a new R session:
net <- dodgr_load_streetnet (f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.