Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

connected.ppp

Connected Components of a Point Pattern


Description

Finds the topologically-connected components of a point pattern, when all pairs of points closer than a threshold distance are joined.

Usage

## S3 method for class 'ppp'
connected(X, R, ...)

## S3 method for class 'pp3'
connected(X, R, ...)

Arguments

X

A point pattern (object of class "ppp" or "pp3").

R

Threshold distance. Pairs of points closer than R units apart will be joined together.

...

Other arguments, not recognised by these methods.

Details

This function can be used to identify clumps of points in a point pattern.

The function connected is generic. This file documents the methods for point patterns in dimension two or three (objects of class "ppp" or "pp3").

The point pattern X is first converted into an abstract graph by joining every pair of points that lie closer than R units apart. Then the connected components of this graph are identified.

Two points in X belong to the same connected component if they can be reached by a series of steps between points of X, each step being shorter than R units in length.

The result is a vector of labels for the points of X where all the points in a connected component have the same label.

Value

A point pattern, equivalent to X except that the points have factor-valued marks, with levels corresponding to the connected components.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

Y <- connected(redwoodfull, 0.1)
   if(interactive()) {
    plot(Y, cols=1:length(levels(marks(Y))),
         main="connected(redwoodfull, 0.1)")
   }
   X <- osteo$pts[[1]]
   Z <- connected(X, 32)
   if(interactive()) {
    plot(Z, col=marks(Z), main="")
   }

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.