## S3 method for class 'lpp':
[(x, i, j, drop=FALSE, ...)
"lpp"
)."owin"
) delineating the region that should
be retained."lpp"
). The function [.lpp
is a method for [
for the
class "lpp"
. It extracts a designated subset of a point pattern.
The argument i
should be a subset index in the usual Rsense:
either a numeric vector
of positive indices (identifying the points to be retained),
a numeric vector of negative indices (identifying the points
to be deleted) or a logical vector of length equal to the number of
points in the point pattern x
. In the latter case,
the points (x$x[i], x$y[i])
for which
subset[i]=TRUE
will be retained, and the others
will be deleted.
The argument j
, if present, should be a spatial window.
The pattern inside the region will be retained.
Line segments that cross the boundary of the window
are deleted in the current implementation.
The argument drop
determines whether to remove
unused levels of a factor, if the point pattern is multitype
(i.e. the marks are a factor) or if the marks are a data frame or hyperframe
in which some of the columns are factors.
Use the function unmark
to remove marks from a
marked point pattern.
lpp
,
subset.lpp
# Chicago crimes data - remove cases of assault
chicago[marks(chicago) != "assault"]
Run the code above in your browser using DataLab