Skip to content

Commit

Permalink
Pass tests offline, close #469
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Oct 12, 2021
1 parent 0e5e7ea commit 8ff9bf9
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ Suggests:
VignetteBuilder: knitr
URL: https://github.com/ropensci/stplanr, https://docs.ropensci.org/stplanr/
SystemRequirements: GNU make
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Roxygen: list(markdown = TRUE)
Encoding: UTF-8
4 changes: 3 additions & 1 deletion R/route.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
#' @examples
#' library(sf)
#' l = od_data_lines[2, ]
#' \donttest{
#' if(curl::has_internet()) {
#' r_walk = route(l = l, route_fun = route_osrm, osrm.profile = "foot")
#' r_bike = route(l = l, route_fun = route_osrm, osrm.profile = "bike")
#' plot(r_walk$geometry)
#' plot(r_bike$geometry, col = "blue", add = TRUE)
#' \donttest{
#' # r_bc = route(l = l, route_fun = route_bikecitizens)
#' # plot(r_bc)
#' # route(l = l, route_fun = route_bikecitizens, wait = 1)
Expand All @@ -41,6 +42,7 @@
#' )
#' plot(r_local["all"], add = TRUE, lwd = 5)
#' }
#' }
route <- function(from = NULL, to = NULL, l = NULL,
route_fun = cyclestreets::journey, wait = 0,
n_print = 10, list_output = FALSE, cl = NULL, ...) {
Expand Down
2 changes: 2 additions & 0 deletions R/route_bikecitizens.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
#' @export
#' @examples
#' \donttest{
#' if(curl::has_internet()) {
#' route_bikecitizens()
#' ldf <- od_coords(stplanr::od_data_lines[2, ])
#' r <- route_bikecitizens(ldf)
#' plot(r)
#' }
#' }
route_bikecitizens <- function(
from = NULL,
to = NULL,
Expand Down
4 changes: 4 additions & 0 deletions R/route_osrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
#' @family routes
#' @export
#' @examples
#' \donttest{
#' l1 = od_data_lines[49, ]
#' l1m = od_coords(l1)
#' from = l1m[, 1:2]
#' to = l1m[, 3:4]
#' if(curl::has_internet()) {
#' r_foot = route_osrm(from, to)
#' r_bike = route_osrm(from, to, osrm.profile = "bike")
#' r_car = route_osrm(from, to, osrm.profile = "car")
#' plot(r_foot$geometry, lwd = 9, col = "grey")
#' plot(r_bike, col = "blue", add = TRUE)
#' plot(r_car, col = "red", add = TRUE)
#' }
#' }
route_osrm <- function(from, to, osrm.server = "https://routing.openstreetmap.de/",
osrm.profile = "foot"){

Expand Down
16 changes: 0 additions & 16 deletions man/od_id.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/route.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/route_bikecitizens.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions man/route_osrm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ff9bf9

Please sign in to comment.