cut.lpp: Classify Points in a Point Pattern on a Network

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/lpp.R


For a point pattern on a linear network, classify the points into distinct types according to the numerical marks in the pattern, or according to another variable.


  ## S3 method for class 'lpp'
cut(x, z=marks(x), ...)



A point pattern on a linear network (object of class "lpp").


Data determining the classification. A numeric vector, a factor, a pixel image on a linear network (class "linim"), a function on a linear network (class "linfun"), a tessellation on a linear network (class "lintess"), a string giving the name of a column of marks, or one of the coordinate names "x", "y", "seg" or "tp".


Arguments passed to cut.default. They determine the breakpoints for the mapping from numerical values in z to factor values in the output. See cut.default.


This function has the effect of classifying each point in the point pattern x into one of several possible types. The classification is based on the dataset z, which may be either

The default is to take z to be the vector of marks in x (or the first column in the data frame of marks of x, if it is a data frame). If the marks are numeric, then 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, on the same linear network, with the same point locations as x, but with the numeric mark of each point discretised by replacing it by the factor level. This 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 x, use the subset operators [.lpp or subset.lpp instead.


A multitype point pattern on the same linear network, that is, a point pattern object (of class "lpp") with a marks vector that is a factor.




See Also

cut, lpp, lintess, linfun, linim


  X <- runiflpp(20, simplenet)
  f <- linfun(function(x,y,seg,tp) { x }, simplenet)
  plot(cut(X, f, breaks=4))
  plot(cut(X, "x", breaks=4))
  plot(cut(X, "seg"))

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