# lpp

##### Create Point Pattern on Linear Network

Creates an object of class `"lpp"`

that represents
a point pattern on a linear network.

- Keywords
- spatial

##### Usage

`lpp(X, L)`

##### Arguments

- X
- Locations of the points. A matrix or data frame of coordinates,
or a point pattern object (of class
`"ppp"`

) or other data acceptable to`as.ppp`

. - L
- Linear network (object of class
`"linnet"`

).

##### Details

This command creates an object of class `"lpp"`

that represents
a point pattern on a linear network.

Normally `X`

is a point pattern. The points of `X`

should lie
on the lines of `L`

.

Alternatively `X`

may be a matrix or data frame containing at
least two columns.

- Usually
the first two columns of
`X`

will be interpreted as spatial coordinates, and any remaining columns as marks. - The exception occurs if
`X`

is a data frame with columns named`x`

,`y`

,`seg`

and`tp`

. Then`x`

and`y`

will be interpreted as spatial coordinates, and`seg`

and`tp`

as local coordinates, with`seg`

indicating which line segment of`L`

the point lies on, and`tp`

indicating how far along the segment the point lies (normalised to 1). Any remaining columns will be interpreted as marks.

##### Value

- An object of class
`"lpp"`

. Also inherits the class`"ppx"`

.

##### Note on changed format

The internal format of `"lpp"`

objects was changed in
`1.28-0`

.
Objects in the old format are still handled correctly,
but computations are faster in the new format.
To convert an object `X`

from the old format to the new format,
use `X <- lpp(as.ppp(X), as.linnet(X))`

.

##### See Also

`intensity.lpp`

,
`methods.lpp`

and
`methods.ppx`

for methods applicable
to `lpp`

objects.
`linnet`

for linear networks.

Random point patterns on a linear network can be generated by
`rpoislpp`

or `runiflpp`

.

##### Examples

```
example(linnet)
xx <- list(x=c(-1.5,0,0.5,1.5), y=c(1.5,3,4.5,1.5))
X <- lpp(xx, letterA)
plot(X)
X
summary(X)
```

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