# cut.ppp

##### Convert Point Pattern Marks from Numeric to Factor

Transform the marks of a marked point pattern from numeric values into a factor.

- Keywords
- spatial

##### Usage

```
cut(x, ...)
cut.ppp(x, ...)
```

##### Arguments

##### Details

This simple function applies the generic `cut`

operation
to the marks of the point pattern `x`

. The range of values
of the numerical marks is divided into several intervals, and each
interval is associated with a level of a factor.
The result is a
marked point pattern, with the same window and point locations as
`x`

, but with the numeric mark of each point discretised
by replacing it by the factor level.

This function is a convenient way to transform a marked point pattern which has numeric marks into a multitype point pattern, for example to plot it or analyse it. See the examples.

To select some points from a point pattern, use the subset operator
`[.ppp`

instead.

##### Value

- A multitype point pattern, that is, a point pattern object
(of class
`"ppp"`

) with a`marks`

vector that is a factor.

##### synopsis

cut.ppp(x, ...)

##### See Also

##### Examples

```
data(longleaf)
# Longleaf Pines data
# the marks are positive real numbers indicating tree diameters.
<testonly># smaller dataset
longleaf <- longleaf[seq(1, longleaf$n, by=80)]</testonly>
plot(longleaf)
# cut the range of tree diameters into three intervals
long3 <- cut(longleaf, 3)
plot(long3)
# adult trees defined to have diameter at least 30 cm
long2 <- cut(longleaf, breaks=c(0,30,100), labels=c("Sapling", "Adult"))
plot(long2)
plot(long2, cols=c("green","blue"))
```

*Documentation reproduced from package spatstat, version 1.6-5, License: GPL version 2 or newer*