Inspecting and Exploring Data 101
Subset defined by an expression
The method subset.ppp can be used to extract a subset of a point pattern d efined by an exp ression
involving the names of spatial coord inates x, y, the marks, and the names of individual columns of
marks, if the re are several columns. For example
> subset(cells, x > 0.5 & y < 0.4)
extracts the subset of the cells data consisting of all po ints with x-coordinate greater than 0.5 and
y-coordinate less than 0.4. Note the single &, the vector-wise ‘and’ operator, so that the result of
evaluating the expression is a logical vector of length equal to the number of points. Similarly
> subset(longleaf, marks >= 42)
extracts the trees from the Longlea f Pines data with mark value greater than ...