# Extract.ppx

##### Extract Subset of Multidimensional Point Pattern

Extract a subset of a multidimensional point pattern.

##### Usage

```
## S3 method for class 'ppx':
[(x, i, ...)
```

##### Arguments

- x
- A multidimensional point pattern (object of class
`"ppx"`

). - i
- Subset index. A valid subset index in the usual Rsense, indicating which points should be retained.
- ...
- Ignored.

##### Details

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`

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.
Use the function `unmark`

to remove marks from a
marked point pattern.

##### Value

- A multidimensional point pattern (of class
`"ppx"`

) in the same domain.

##### See Also

##### Examples

```
df <- data.frame(x=runif(4),y=runif(4),z=runif(4))
X <- ppx(data=df, coord.type=c("s","s","t"))
X[-2]
```

*Documentation reproduced from package spatstat, version 1.29-0, License: GPL (>= 2)*