
Last chance! 50% off unlimited learning
Sale ends in
Extract a subset of a multidimensional point pattern.
# S3 method for ppx
[(x, i, drop=FALSE, ...)
A multidimensional point pattern (object of class "ppx"
).
Subset index. A valid subset index in the usual R sense,
indicating which points should be retained;
or a spatial domain of class "boxx"
or "box3"
.
Logical value indicating whether to remove unused levels of the marks, if the marks are a factor.
Ignored.
A multidimensional point pattern (of class "ppx"
).
This function extracts a designated subset of a multidimensional point pattern.
The function [.ppx
is a method for [
for the
class "ppx"
. It extracts a designated subset of a point pattern.
The argument i
may be either
a subset index in the usual R sense:
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.
a spatial domain of class "boxx"
or "box3"
.
Points falling inside this region will be retained.
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.
# NOT RUN {
df <- data.frame(x=runif(4),y=runif(4),z=runif(4))
X <- ppx(data=df, coord.type=c("s","s","t"))
X[-2]
# }
Run the code above in your browser using DataLab