Skip to content

Commit

Permalink
create new roxygen2 family for match functions for #103
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Aug 11, 2022
1 parent 09485ca commit dbdfee2
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 132 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dodgr
Title: Distances on Directed Graphs
Version: 0.2.14.088
Version: 0.2.14.090
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
person("Andreas", "Petutschnig", role = "aut"),
Expand Down
24 changes: 19 additions & 5 deletions R/match-points.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' matching.
#'
#' @return A vector index into verts
#' @family misc
#' @family match
#' @export
#' @examples
#' net <- weight_streetnet (hampi, wt_profile = "foot")
Expand Down Expand Up @@ -60,7 +60,7 @@ match_pts_to_verts <- function (verts, xy, connected = FALSE) {
#'
#' Alias for \link{match_pts_to_verts}
#' @inherit match_pts_to_verts
#' @family misc
#' @family match
#' @export
match_points_to_verts <- function (verts, xy, connected = FALSE) {

Expand Down Expand Up @@ -117,7 +117,7 @@ pre_process_xy <- function (xy) {
#' @return A vector index matching the `xy` coordinates to nearest edges. For
#' bi-directional edges, only one match is returned, and it is up to the user to
#' identify and suitably process matching edge pairs.
#' @family misc
#' @family match
#' @export
#' @examples
#' graph <- weight_streetnet (hampi, wt_profile = "foot")
Expand Down Expand Up @@ -155,7 +155,7 @@ match_pts_to_graph <- function (graph, xy, connected = FALSE) {
#'
#' Alias for \link{match_pts_to_graph}
#' @inherit match_pts_to_graph
#' @family misc
#' @family match
#' @export
match_points_to_graph <- function (graph, xy, connected = FALSE) {

Expand All @@ -174,7 +174,21 @@ match_points_to_graph <- function (graph, xy, connected = FALSE) {
#' @return A modified version of `graph`, with additional edges formed by
#' breaking previous edges at nearest penpendicular intersections with the
#' points, `xy`.
#' @family misc
#' @family match
#' @examples
#' graph <- weight_streetnet (hampi, wt_profile = "foot")
#' dim (graph)
#'
#' verts <- dodgr_vertices (graph)
#' set.seed (2)
#' npts <- 10
#' xy <- data.frame (
#' x = min (verts$x) + runif (npts) * diff (range (verts$x)),
#' y = min (verts$y) + runif (npts) * diff (range (verts$y))
#' )
#'
#' graph <- add_nodes_to_graph (graph, xy)
#' dim (graph) # more edges than original
#' @export
add_nodes_to_graph <- function (graph, xy) {

Expand Down
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ reference:
- title: Graph Centrality
contents:
- has_concept("centrality")
- title: Matching Points to Graphs
contents:
- has_concept("match")
- title: Miscellaneous Functions
contents:
- has_concept("misc")
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.14.088",
"version": "0.2.14.090",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
32 changes: 18 additions & 14 deletions man/add_nodes_to_graph.Rd

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

5 changes: 0 additions & 5 deletions man/compare_heaps.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_flowmap.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_full_cycles.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_fundamental_cycles.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_insert_vertex.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_sample.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_sflines_to_poly.Rd

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

5 changes: 0 additions & 5 deletions man/dodgr_vertices.Rd

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

17 changes: 3 additions & 14 deletions man/match_points_to_graph.Rd

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

17 changes: 3 additions & 14 deletions man/match_points_to_verts.Rd

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

17 changes: 3 additions & 14 deletions man/match_pts_to_graph.Rd

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

17 changes: 3 additions & 14 deletions man/match_pts_to_verts.Rd

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

5 changes: 0 additions & 5 deletions man/merge_directed_graph.Rd

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

Loading

0 comments on commit dbdfee2

Please sign in to comment.