# areaGain

0th

Percentile

##### Difference of Disc Areas

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

Keywords
spatial, math
##### Usage
areaGain(u, X, r, W=NULL, 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
W
Optional. Window (object of class "owin") in which the area should be computed.
ngrid
Dimensions of the ngrid * ngrid array of test points that will be used to estimate the uncovered area.
##### 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. Currently this is implemented only for rectangular windows.

The area is calculated by discrete approximation, using an ngrid * ngrid grid of test points.

##### Value

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

AreaInter, areaLoss

• areaGain
##### Examples
data(cells)
u <- c(0.5,0.5)
areaGain(u, cells, 0.1)
Documentation reproduced from package spatstat, version 1.16-2, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.