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

pppmatching

Create a Point Matching


Description

Creates an object of class "pppmatching" representing a matching of two planar point patterns (objects of class "ppp").

Usage

pppmatching(X, Y, am, type = NULL, cutoff = NULL, q = NULL,
    mdist = NULL)

Arguments

X,Y

Two point patterns (objects of class "ppp").

am

An npoints(X) by npoints(Y) matrix with entries >= 0 that specifies which points are matched and with what weight; alternatively, an object that can be coerced to this form by as.matrix.

type

A character string giving the type of the matching. One of "spa", "ace" or "mat", or NULL for a generic or unknown matching.

cutoff, q

Numerical values specifying the cutoff value > 0 for interpoint distances and the order q in [0,Inf] of the average that is applied to them. NULL if not applicable or unknown.

mdist

Numerical value for the distance to be associated with the matching.

Details

The argument am is interpreted as a "generalized adjacency matrix": if the [i,j]-th entry is positive, then the i-th point of X and the j-th point of Y are matched and the value of the entry gives the corresponding weight of the match. For an unweighted matching all the weights should be set to 1.

The remaining arguments are optional and allow to save additional information about the matching. See the help files for pppdist and matchingdist for details on the meaning of these parameters.

Author(s)

See Also

Examples

# a random unweighted complete matching
  X <- runifrect(10)
  Y <- runifrect(10)
  am <- r2dtable(1, rep(1,10), rep(1,10))[[1]]
        # generates a random permutation matrix
  m <- pppmatching(X, Y, am)
  summary(m)
  m$matrix
  plot(m)

  # a random weighted complete matching
  X <- runifrect(7)
  Y <- runifrect(7)
  am <- r2dtable(1, rep(10,7), rep(10,7))[[1]]/10
        # generates a random doubly stochastic matrix
  m2 <- pppmatching(X, Y, am)
  summary(m2)
  m2$matrix
  plot(m2)
  m3 <- pppmatching(X, Y, am, "ace")
  m4 <- pppmatching(X, Y, am, "mat")

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.