Skip to content

Commit

Permalink
Add missing seealso bits, close #499
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Nov 8, 2022
1 parent 2f65f03 commit ed2af3b
Show file tree
Hide file tree
Showing 41 changed files with 408 additions and 118 deletions.
25 changes: 14 additions & 11 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @examples
#' cents_sf
#' @docType data
#' @family example data
#' @family data
#' @keywords datasets
#' @name cents_sf
#' @format A spatial dataset with 8 rows and 5 columns
Expand All @@ -40,9 +40,9 @@ NULL
#' structure is generalisable and typical of flow data from any source.
#' The key variables are the origin and destination ids, which link to
#' the georeferenced spatial objects.
#' @family example data
#' @family data
#' @docType data
#' @family example data
#' @family data
#' @keywords datasets
#' @name flow
#' @format A data frame with 49 rows and 15 columns
Expand All @@ -51,7 +51,6 @@ NULL
#' Data frame of invented
#' commuter flows with destinations in a different layer than the origins
#'
#' @family example data
#' @examples
#' \dontrun{
#' # This is how the dataset was constructed
Expand All @@ -60,9 +59,8 @@ NULL
#' flow_dests <- dplyr::rename(flow_dests, WZ11CD = Area.of.workplace)
#' devtools::use_data(flow_dests)
#' }
#'
#' @docType data
#' @family example data
#' @family data
#' @keywords datasets
#' @name flow_dests
#' @usage data(flow_dests)
Expand All @@ -76,7 +74,7 @@ NULL
#' representing the 'fastest' between `cents_sf`
#' objects.
#'
#' @family example data
#' @family data
#' @docType data
#' @keywords datasets
#' @name routes_fast_sf
Expand All @@ -90,7 +88,7 @@ NULL
#' Simulated travel route allocated to the transport network
#' representing the 'quietest' between `cents_sf`.
#'
#' @family example data
#' @family data
#' @docType data
#' @keywords datasets
#' @name routes_slow_sf
Expand All @@ -112,14 +110,15 @@ NULL
#' @docType data
#' @keywords datasets
#' @name zones_sf
#' @family data
NULL

#' Spatial lines dataset of commuter flows
#'
#'
#' Flow data after conversion to a spatial format..
#'
#' @family example data
#' @family data
#' @docType data
#' @keywords datasets
#' @name flowlines_sf
Expand All @@ -132,7 +131,7 @@ NULL
#' The flow of commuters using different segments of the road network represented in the
#' [flowlines_sf()] and [routes_fast_sf()] datasets
#'
#' @family example data
#' @family data
#' @docType data
#' @keywords datasets
#' @name route_network_sf
Expand All @@ -144,6 +143,7 @@ NULL
#' @keywords datasets
#' @name osm_net_example
#' @format An sf object
#' @family data
#' @examples
#' osm_net_example
NULL
Expand All @@ -156,6 +156,7 @@ NULL
#' @keywords datasets
#' @name od_data_sample
#' @format A data frame (tibble) object
#' @family data
#' @examples
#' od_data_sample
NULL
Expand All @@ -168,6 +169,7 @@ NULL
#' @keywords datasets
#' @name od_data_lines
#' @format A data frame (tibble) object
#' @family data
#' @examples
#' od_data_lines
NULL
Expand All @@ -183,6 +185,7 @@ NULL
#' @keywords datasets
#' @name od_data_routes
#' @format A data frame (tibble) object
#' @family data
#' @examples
#' od_data_routes
NULL
Expand Down Expand Up @@ -228,7 +231,7 @@ NULL
#'
#' This dataset represents trip destinations on a different geographic
#' level than the origins stored in the object `cents_sf`.
#' @family example data
#' @family data
#' @examples
#' destinations_sf
#' @docType data
Expand Down
4 changes: 4 additions & 0 deletions R/geo_projected.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#' @examples
#' shp <- zones_sf
#' geo_select_aeq(shp)
#' @family geo
#' @export
geo_select_aeq <- function(shp) {
UseMethod("geo_select_aeq")
Expand Down Expand Up @@ -54,6 +55,7 @@ geo_select_aeq.sfc <- function(shp) {
#' @param ... Arguments to pass to `fun`
#' @aliases gprojected
#' @export
#' @family geo
#' @examples
#' lib_versions <- sf::sf_extSoftVersion()
#' lib_versions
Expand Down Expand Up @@ -120,6 +122,7 @@ geo_projected.sfc <- function(shp, fun, crs = geo_select_aeq(shp), silent = TRUE
#' plot(buff_sf$geometry)
#' geo_buffer(routes_fast_sf$geometry, dist = 50)
#' }
#' @family geo
#' @export
geo_buffer <- function(shp, dist = NULL, width = NULL, ...) {
UseMethod("geo_buffer")
Expand All @@ -144,6 +147,7 @@ geo_buffer.sfc <- function(shp, ...) {
#' if (lib_versions[3] >= "6.3.1") {
#' geo_length(routes_fast_sf)
#' }
#' @family geo
#' @export
geo_length <- function(shp) {
UseMethod("geo_length")
Expand Down
2 changes: 1 addition & 1 deletion R/oneway.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#' @examples
#' x <- data.frame(id1 = c(1, 1, 2, 2, 3), id2 = c(1, 2, 3, 1, 4))
#' od_id_order(x) # 4th line switches id1 and id2 so stplanr.key is in order
#' @family od
#' @export
od_id_order <- function(x, id1 = names(x)[1], id2 = names(x)[2]) {
data.frame(
Expand Down Expand Up @@ -33,7 +34,6 @@ od_id_order <- function(x, id1 = names(x)[1], id2 = names(x)[2]) {
#' @param y a vector of numeric, character, or factor values
#' @param ordermatters logical, does the order of values matter to pairing, default = FALSE
#' @family od
#' @seealso od_oneway
#' @name od_id
#' @examples
#' (d <- od_data_sample[2:9, 1:2])
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ reference:
- title: Work with and analyse routes
contents:
- has_concept("route_funs")
- starts_with("route")
- title: Routing
contents:
- has_concept("routes")
Expand All @@ -23,10 +24,13 @@ reference:
- has_concept("nodes")
- title: Route network functions
contents:
- starts_with("rnet")
- starts_with("over")
- has_concept("rnet")
- title: Geographic functions
contents:
- has_concept("geo")
- starts_with("stplanr")
- title: Get transport data
contents:
- has_concept("data")
Expand Down
Loading

0 comments on commit ed2af3b

Please sign in to comment.