Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:CityRiverSpaces/rcoins into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fnattino committed Oct 28, 2024
2 parents 8b5ecd6 + 71fe883 commit a1965b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Suggests:
testthat (>= 3.0.0)
testthat (>= 3.0.0),
sfnetworks
Config/testthat/edition: 3
Imports:
dplyr,
Expand Down
8 changes: 4 additions & 4 deletions R/stroke.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Apply the Continuity in Street Network (COINS) method to identify
#' sequences of edges that form naturally continuous strokes in a network.
#'
#' @param edges An object of class \code{\link[sfc]{sfc}} (or compatible),
#' @param edges An object of class \code{\link[sf]{sfc}} (or compatible),
#' including the edge geometries (should be of type LineString or
#' MultiLineString).
#'
Expand All @@ -22,7 +22,7 @@
#' @param from_edge Only look for the continuous strokes that include the
#' provided edges or line segments.
#'
#' @return An object of class \code{\link[sfc]{sfc}} (if
#' @return An object of class \code{\link[sf]{sfc}} (if
#' \code{attributes = FALSE}), a vector with the same length as \code{edges}
#' otherwise.
#'
Expand Down Expand Up @@ -97,11 +97,11 @@ to_line_segments <- function(points, nodes) {
#' @noRd
get_links <- function(segments) {
nsegments <- nrow(segments)
connections <- data.frame(node_id = as.vector(segments)) |>
links <- data.frame(node_id = as.vector(segments)) |>
dplyr::group_by(node_id) |>

Check warning on line 101 in R/stroke.R

View workflow job for this annotation

GitHub Actions / lint

file=R/stroke.R,line=101,col=21,[object_usage_linter] no visible binding for global variable 'node_id'
dplyr::group_rows() |>
lapply(function(x) (x - 1) %% nsegments + 1)
return(connections)
return(links)
}

#' @noRd
Expand Down

0 comments on commit a1965b8

Please sign in to comment.