# ppp.object

From spatstat v1.3-4
by Adrian Baddeley

##### Class of Point Patterns

A class `"ppp"`

to represent a two-dimensional point
pattern. Includes information about the window in which the
pattern was observed. Optionally includes marks.

- Keywords
- spatial

##### Details

This class represents a two-dimensional point pattern dataset. It specifies

- the locations of the points
- the window in which the pattern was observed
- optionally, a ``mark'' attached to each point (extra information such as a type label).

##### code

##### tabular

ll

##### tab

vector of $x$ coordinates of data points
`y`

vector of $y$ coordinates of data points
`n`

number of points
`window`

window of observation
(an object of class `owin`

)
`marks`

optional vector of marks

##### Warnings

The internal representation of marks is likely to change in the next release of this package.

##### See Also

##### Examples

```
library(spatstat)
x <- runif(100)
y <- runif(100)
X <- ppp(x, y, c(0,1),c(0,1))
X
plot(X)
mar <- sample(1:3, 100, replace=TRUE)
mm <- ppp(x, y, c(0,1), c(0,1), marks=mar)
plot(mm)
# points with mark equal to 2
ss <- mm[ mm$marks == 2 , ]
plot(ss)
# left half of pattern 'mm'
lu <- owin(c(0,0.5),c(0,1))
mmleft <- mm[ , lu]
plot(mmleft)
# input data from file
qq <- scanpp("my.table", unit.square())
# interactively build a point pattern
plot(unit.square())
X <- as.ppp(locator(10), unit.square())
plot(X)
```

*Documentation reproduced from package spatstat, version 1.3-4, License: GPL version 2 or newer*

### Community examples

Looks like there are no examples yet.