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

discpartarea

Area of Part of Disc


Description

Compute area of intersection between a disc and a window

Usage

discpartarea(X, r, W=as.owin(X))

Arguments

X

Point pattern (object of class "ppp") specifying the centres of the discs. Alternatively, X may be in any format acceptable to as.ppp.

r

Matrix, vector or numeric value specifying the radii of the discs.

W

Window (object of class "owin") with which the discs should be intersected.

Details

This algorithm computes the exact area of the intersection between a window W and a disc (or each of several discs). The centres of the discs are specified by the point pattern X, and their radii are specified by r.

If r is a single numeric value, then the algorithm computes the area of intersection between W and the disc of radius r centred at each point of X, and returns a one-column matrix containing one entry for each point of X.

If r is a vector of length m, then the algorithm returns an n * m matrix in which the entry on row i, column j is the area of the intersection between W and the disc centred at X[i] with radius r[j].

If r is a matrix, it should have one row for each point in X. The algorithm returns a matrix in which the entry on row i, column j is the area of the intersection between W and the disc centred at X[i] with radius r[i,j].

Areas are computed by analytic geometry.

Value

Numeric matrix, with one row for each point of X.

Author(s)

See Also

Examples

X <- unmark(demopat)[1:3]
  discpartarea(X, 0.2)

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.