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

corners

Corners of a rectangle


Description

Returns the four corners of a rectangle

Usage

corners(window)

Arguments

window

A window. An object of class owin, or data in any format acceptable to as.owin().

Details

This trivial function is occasionally convenient. If window is of type "rectangle" this returns the four corners of the window itself; otherwise, it returns the corners of the bounding rectangle of the window.

Value

A list with two components x and y, which are numeric vectors of length 4 giving the coordinates of the four corner points of the (bounding rectangle of the) window.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

w <- unit.square()
  corners(w)
       # returns list(x=c(0,1,0,1),y=c(0,0,1,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.