spatstat.geom (version 3.2-9)

diameter.owin: Diameter of a Window

Description

Computes the diameter of a window.

Usage

# S3 method for owin
diameter(x)

Value

The numerical value of the diameter of the window.

Arguments

x

A window whose diameter will be computed.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

and Rolf Turner rolfturner@posteo.net

Details

This function computes the diameter of a window of arbitrary shape, i.e. the maximum distance between any two points in the window.

The argument x should be a window (an object of class "owin", see owin.object for details) or can be given in any format acceptable to as.owin().

The function diameter is generic. This function is the method for the class "owin".

See Also

area.owin, perimeter, edges, owin, as.owin

Examples

Run this code
  w <- owin(c(0,1),c(0,1))
  diameter(w) 
  # returns sqrt(2)
  diameter(letterR)

Run the code above in your browser using DataLab