diameter.owin: Diameter of a Window

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/wingeom.R

Description

Computes the diameter of a window.

Usage

1
2
 ## S3 method for class 'owin'
diameter(x)

Arguments

x

A window whose diameter will be computed.

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".

Value

The numerical value of the diameter of the window.

Author(s)

\adrian

and \rolf

See Also

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

Examples

1
2
3
4
5
  w <- owin(c(0,1),c(0,1))
  diameter(w) 
  # returns sqrt(2)
  data(letterR)
  diameter(letterR)

spatstat documentation built on Oct. 9, 2017, 1:05 a.m.