spatstat (version 1.23-5)

multiplicity.ppp: Count Multiplicity of Duplicate Points

Description

Counts the number of duplicates for each point in a spatial point pattern.

Usage

multiplicity.ppp(x)

Arguments

x
A spatial point pattern (object of class "ppp").

Value

  • A vector of integers (multiplicities) of length equal to the number of points in x.

Details

Two points in a point pattern are deemed to be identical if their $x,y$ coordinates are the same, and their marks are also the same (if they carry marks). The Examples section illustrates how it is possible for a point pattern to contain a pair of identical points.

For each point in x, this function counts how many points are identical to it, and returns the vector of counts.

See Also

ppp.object, duplicated.ppp, unique.ppp

Examples

Run this code
X <- ppp(c(1,1,0.5), c(2,2,1), window=square(3))
   m <- multiplicity.ppp(X)

   # unique points in X, marked by multiplicity
   first <- !duplicated(X)
   Y <- X[first] %mark% m[first]

Run the code above in your browser using DataCamp Workspace