Skip to content

Commit 566bf2d

Browse files
committed
docs: switch assignment operator in examples from = to <-
1 parent 9d66a65 commit 566bf2d

16 files changed

+34
-46
lines changed

R/directions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#' @template return-parsed
1717
#' @template return-sf
1818
#' @examples
19-
#' coordinates = list(c(8.34234, 48.23424), c(8.34423, 48.26424))
19+
#' coordinates <- list(c(8.34234, 48.23424), c(8.34423, 48.26424))
2020
#'
2121
#' # simple call
2222
#' ors_directions(coordinates, preference="fastest")

R/elevation.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#' @template return-parsed
1818
#' @template return-sf
1919
#' @examples
20-
#'
2120
#' # point coordinates
2221
#' coordinates <- c(13.349762, 38.11295)
2322
#' ors_elevation("point", coordinates)
@@ -32,7 +31,6 @@
3231
#' c(12.638397, 37.645772)
3332
#' )
3433
#' ors_elevation("polyline", coordinates, format_out = "encodedpolyline")
35-
#'
3634
#' @template author
3735
#' @importFrom httr add_headers
3836
#' @export

R/geocode.R

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,21 @@
1919
#' tag which surrounds the given coordinate.
2020
#' @template author
2121
#' @examples
22-
#'
2322
#' ## locations of Heidelberg around the globe
24-
#' x = ors_geocode("Heidelberg")
25-
#'
26-
#' ## set the number of results returne
23+
#' x <- ors_geocode("Heidelberg")
2724
#'
28-
#' x = ors_geocode("Heidelberg", size = 1)
25+
#' ## set the number of results returned
26+
#' x <- ors_geocode("Heidelberg", size = 1)
2927
#'
3028
#' ## search within a particular country
3129
#' ors_geocode("Heidelberg", boundary.country = "DE")
3230
#'
3331
#' ## structured geocoding
34-
#' x = ors_geocode(list(locality="Heidelberg", county="Heidelberg"))
32+
#' x <- ors_geocode(list(locality="Heidelberg", county="Heidelberg"))
3533
#'
3634
#' ## reverse geocoding
37-
#' location = x$features[[1L]]$geometry$coordinates
38-
#' y = ors_geocode(location = location, layers = "locality", size = 1)
39-
#'
35+
#' location <- x$features[[1L]]$geometry$coordinates
36+
#' y <- ors_geocode(location = location, layers = "locality", size = 1)
4037
#' @export
4138
ors_geocode <- function(query,
4239
location,

R/matrix.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
#' @template return-text
1616
#' @template return-parsed
1717
#' @examples
18-
#' coordinates = list(
18+
#' coordinates <- list(
1919
#' c(9.970093, 48.477473),
2020
#' c(9.207916, 49.153868),
2121
#' c(37.573242, 55.801281),
2222
#' c(115.663757,38.106467)
2323
#' )
2424
#'
2525
#' # query for duration and distance in km
26-
#' res = ors_matrix(coordinates, metrics = c("duration", "distance"), units = "km")
26+
#' res <- ors_matrix(coordinates, metrics = c("duration", "distance"), units = "km")
2727
#'
2828
#' # duration in hours
2929
#' res$durations / 3600

R/optimization.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#' @examples
1919
#' home_base <- c(2.35044, 48.71764)
2020
#'
21-
#' vehicles = vehicles(
21+
#' vehicles <- vehicles(
2222
#' id = 1:2,
2323
#' profile = "driving-car",
2424
#' start = home_base,
@@ -37,7 +37,7 @@
3737
#' c(2.89357, 48.90736)
3838
#' )
3939
#'
40-
#' jobs = jobs(
40+
#' jobs <- jobs(
4141
#' id = 1:6,
4242
#' service = 300,
4343
#' amount = 1,

R/pois.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
#' ors_pois('list')
2929
#'
3030
#' # POIs around a buffered point
31-
#' geometry = list(geojson = list(type = "Point",
32-
#' coordinates = c(8.8034, 53.0756)),
31+
#' geometry <- list(geojson = list(type = "Point",
32+
#' coordinates = c(8.8034, 53.0756)),
3333
#' buffer = 100)
3434
#' ors_pois(geometry = geometry)
3535
#'

R/snap.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616
#' @template return-parsed
1717
#' @template return-sf
1818
#' @examples
19-
#' locations = list(
19+
#' locations <- list(
2020
#' c(8.669629, 49.413025),
2121
#' c(8.675841, 49.418532),
2222
#' c(8.665144, 49.415594)
2323
#' )
2424
#'
25-
#' # query for duration and distance in km
26-
#' res = ors_snap(locations, radius = 350)
27-
#'
25+
#' # query for locations snapped onto the OpenStreetMap road network
26+
#' res <- ors_snap(locations, radius = 350)
2827
#' @template author
2928
#' @export
3029
ors_snap <- function(locations,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ allows you to painlessly consume the following services:
1616
- [isochrones](https://openrouteservice.org/dev/#/api-docs/v2/isochrones/%7Bprofile%7D/post)
1717
(accessibility)
1818
- time-distance
19-
[matrix](https://openrouteservice.org/dev/#/api-docs/v2/matrix/%7Bprofile%7D/post)
19+
[matrices](https://openrouteservice.org/dev/#/api-docs/v2/matrix/%7Bprofile%7D/post)
2020
- [snapping](https://openrouteservice.org/dev/#/api-docs/v2/snap/%7Bprofile%7D/post)
2121
to ways
2222
- [pois](https://openrouteservice.org/dev/#/api-docs/pois/post)

man/ors_directions.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ors_elevation.Rd

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)