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

areaGain

Difference of Disc Areas


Description

Computes the area of that part of a disc that is not covered by other discs.

Usage

areaGain(u, X, r, ..., W=as.owin(X), exact=FALSE,
                     ngrid=spatstat.options("ngrid.disc"))

Arguments

u

Coordinates of the centre of the disc of interest. A vector of length 2. Alternatively, a point pattern (object of class "ppp").

X

Locations of the centres of other discs. A point pattern (object of class "ppp").

r

Disc radius, or vector of disc radii.

...

Arguments passed to distmap to determine the pixel resolution, when exact=FALSE.

W

Window (object of class "owin") in which the area should be computed.

exact

Choice of algorithm. If exact=TRUE, areas are computed exactly using analytic geometry. If exact=FALSE then a faster algorithm is used to compute a discrete approximation to the areas.

ngrid

Integer. Number of points in the square grid used to compute the discrete approximation, when exact=FALSE.

Details

This function computes the area of that part of the disc of radius r centred at the location u that is not covered by any of the discs of radius r centred at the points of the pattern X. This area is important in some calculations related to the area-interaction model AreaInter.

If u is a point pattern and r is a vector, the result is a matrix, with one row for each point in u and one column for each entry of r. The [i,j] entry in the matrix is the area of that part of the disc of radius r[j] centred at the location u[i] that is not covered by any of the discs of radius r[j] centred at the points of the pattern X.

If W is not NULL, then the areas are computed only inside the window W.

Value

A matrix with one row for each point in u and one column for each value in r.

Author(s)

See Also

Examples

u <- c(0.5,0.5)
   areaGain(u, cells, 0.1)

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.