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

fardist

Farthest Distance to Boundary of Window


Description

Computes the farthest distance from each pixel, or each data point, to the boundary of the window.

Usage

fardist(X, ...)

  ## S3 method for class 'owin'
fardist(X, ..., squared=FALSE)

  ## S3 method for class 'ppp'
fardist(X, ..., squared=FALSE)

Arguments

X

A spatial object such as a window or point pattern.

...

Arguments passed to as.mask to determine the pixel resolution, if required.

squared

Logical. If TRUE, the squared distances will be returned.

Details

The function fardist is generic, with methods for the classes owin and ppp.

For a window W, the command fardist(W) returns a pixel image in which the value at each pixel is the largest distance from that pixel to the boundary of W.

For a point pattern X, with window W, the command fardist(X) returns a numeric vector with one entry for each point of X, giving the largest distance from that data point to the boundary of W.

Value

For fardist.owin, a pixel image (object of class "im").

For fardist.ppp, a numeric vector.

Author(s)

and Ege Rubak rubak@math.aau.dk

Examples

fardist(cells)

  plot(FR <- fardist(letterR))

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.