diff --git a/DESCRIPTION b/DESCRIPTION index 98b0cf162..4d7b1554f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dodgr Title: Distances on Directed Graphs -Version: 0.2.18.005 +Version: 0.2.18.006 Authors@R: c( person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")), person("Andreas", "Petutschnig", role = "aut"), diff --git a/codemeta.json b/codemeta.json index bd84abedc..84fd88f48 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/ATFutures/dodgr", "issueTracker": "https://github.com/ATFutures/dodgr/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.2.18.005", + "version": "0.2.18.006", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/vignettes/times.Rmd b/vignettes/times.Rmd index 851717595..b12258ec6 100644 --- a/vignettes/times.Rmd +++ b/vignettes/times.Rmd @@ -162,7 +162,8 @@ these routing vertices as illustrated in the following example: dat_sc <- dodgr_streetnet_sc ("ogbomosho nigeria") graph <- weight_streetnet (dat_sc, wt_profile = "bicycle") graph_t <- weight_streetnet (dat_sc, wt_profile = "bicycle", turn_penalty = TRUE) -nrow (graph); nrow (graph_t) +nrow (graph) +nrow (graph_t) ``` ```{r streetnet_times-out1, echo = FALSE} c (164168, 173160) @@ -189,7 +190,8 @@ turn penalties, and will be matched on to the corresponding nodes appended with will generally be quicker to first contract the graph prior to routing. ```{r routing, eval = FALSE} graph_tc <- dodgr_contract_graph (graph_t) -nrow (graph_tc); nrow (graph_t) +nrow (graph_tc) +nrow (graph_t) ``` ```{r routing-out, echo = FALSE} c (35808, 176160) @@ -256,9 +258,11 @@ from <- sample (graph$from_id, size = n) to <- sample (graph$from_id, size = n) d_dist <- dodgr_dists (graph, from = from, to = to, shortest = TRUE) # default d_time <- dodgr_dists (graph, from = from, to = to, shortest = FALSE) # fastest paths -plot (d_dist / 1000, d_time / 1000, col = "orange", - xlab = "distances along shortest paths (km)", - ylab = "distances along fastest paths (km)") +plot (d_dist / 1000, d_time / 1000, + col = "orange", + xlab = "distances along shortest paths (km)", + ylab = "distances along fastest paths (km)" +) lines (0:100, 0:100, col = "red", lty = 2) ``` @@ -296,9 +300,11 @@ function: ```{r shortest-vs-fastest-times} t_dist <- dodgr_times (graph, from = from, to = to, shortest = TRUE) # default t_time <- dodgr_times (graph, from = from, to = to, shortest = FALSE) # fastest paths -plot (t_dist / 3600, t_time / 3600, col = "orange", - xlab = "times along shortest paths (hours)", - ylab = "times along fastest paths (hours)") +plot (t_dist / 3600, t_time / 3600, + col = "orange", + xlab = "times along shortest paths (hours)", + ylab = "times along fastest paths (hours)" +) lines (0:100, 0:100, col = "red", lty = 2) mean (abs (t_time - t_dist), na.rm = TRUE) ```