Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.