lpp: Create Point Pattern on Linear Network

Description Usage Arguments Details Value Note on changed format Author(s) See Also Examples

View source: R/lpp.R

Description

Creates an object of class "lpp" that represents a point pattern on a linear network.

Usage

1
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").

...

Ignored.

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.

If X is missing or NULL, the result is an empty point pattern (i.e. containing no points).

Value

An object of class "lpp". Also inherits the class "ppx".

Note on changed format

The internal format of "lpp" objects was changed in spatstat version 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)).

Author(s)

Ang Qi Wei aqw07398@hotmail.com and \adrian

See Also

Installed datasets which are "lpp" objects: chicago, dendrite, spiders.

See as.lpp for converting data to an lpp object.

See methods.lpp and methods.ppx for other methods applicable to lpp objects.

Calculations on an lpp object: intensity.lpp, distfun.lpp, nndist.lpp, nnwhich.lpp, nncross.lpp, nnfun.lpp.

Summary functions: linearK, linearKinhom, linearpcf, linearKdot, linearKcross, linearmarkconnect, etc.

Random point patterns on a linear network can be generated by rpoislpp or runiflpp.

See linnet for linear networks.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  # letter 'A' 
  v <- ppp(x=(-2):2, y=3*c(0,1,2,1,0), c(-3,3), c(-1,7))
  edg <- cbind(1:4, 2:5)
  edg <- rbind(edg, c(2,4))
  letterA <- linnet(v, edges=edg)

  # points on letter A
  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)

  # empty pattern
  lpp(L=letterA)

spatstat.linnet documentation built on July 17, 2021, 9:07 a.m.