@@ -36,6 +36,7 @@ format.sfc = function(x, ..., width = 30) {
3636# ' pt1 = st_point(c(0,1))
3737# ' pt2 = st_point(c(1,1))
3838# ' (sfc = st_sfc(pt1, pt2))
39+ # ' sfc[sfc[1], op = st_is_within_distance, dist = 0.5]
3940# ' d = st_sf(data.frame(a=1:2, geom=sfc))
4041# ' @export
4142st_sfc = function (... , crs = NA_crs_ , precision = 0.0 , check_ring_dir = FALSE , dim ,
@@ -139,6 +140,13 @@ st_sfc = function(..., crs = NA_crs_, precision = 0.0, check_ring_dir = FALSE, d
139140 lst
140141}
141142
143+ # ' @name sfc
144+ # ' @param x object of class \code{sfc}
145+ # ' @param i record selection. Might also be an \code{sfc}/\code{sf} object to work with the \code{op} argument
146+ # ' @param j ignored
147+ # ' @param op function, geometrical binary predicate function to apply when
148+ # ' \code{i} is a \code{sf}/\code{sfc} object. Additional arguments can be
149+ # ' specified using \code{...}, see examples.
142150# ' @export
143151" [.sfc" = function (x , i , j , ... , op = st_intersects ) {
144152 if (! missing(i ) && (inherits(i , " sf" ) || inherits(i , " sfc" ) || inherits(i , " sfg" )))
0 commit comments