Skip to content

Commit

Permalink
Merge pull request #2322 from agila5/docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
edzer authored Jan 25, 2024
2 parents a2baba7 + 04c8c31 commit 274e4fc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions R/sfc.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ format.sfc = function(x, ..., width = 30) {
#' pt1 = st_point(c(0,1))
#' pt2 = st_point(c(1,1))
#' (sfc = st_sfc(pt1, pt2))
#' sfc[sfc[1], op = st_is_within_distance, dist = 0.5]
#' d = st_sf(data.frame(a=1:2, geom=sfc))
#' @export
st_sfc = function(..., crs = NA_crs_, precision = 0.0, check_ring_dir = FALSE, dim,
Expand Down Expand Up @@ -139,6 +140,13 @@ st_sfc = function(..., crs = NA_crs_, precision = 0.0, check_ring_dir = FALSE, d
lst
}

#' @name sfc
#' @param x object of class \code{sfc}
#' @param i record selection. Might also be an \code{sfc}/\code{sf} object to work with the \code{op} argument
#' @param j ignored
#' @param op function, geometrical binary predicate function to apply when
#' \code{i} is a \code{sf}/\code{sfc} object. Additional arguments can be
#' specified using \code{...}, see examples.
#' @export
"[.sfc" = function(x, i, j, ..., op = st_intersects) {
if (!missing(i) && (inherits(i, "sf") || inherits(i, "sfc") || inherits(i, "sfg")))
Expand Down
14 changes: 14 additions & 0 deletions man/sfc.Rd

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

2 changes: 1 addition & 1 deletion man/st_graticule.Rd

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

0 comments on commit 274e4fc

Please sign in to comment.