Learn R Programming

spatstat (version 1.11-4)

as.rectangle: Window Frame

Description

Get the window frame of an (irregular) window

Usage

as.rectangle(...)

Arguments

...
A window. Either an object of class "owin", or other data determining such a window. The argument(s) are passed to as.owin.

Value

  • A window (object of class "owin") of type "rectangle" representing a rectangle.

Details

This function just extracts the outer bounding rectangle of the window w as given by its elements xrange,yrange.

Use the function bounding.box to compute the smallest bounding rectangle.

See Also

owin, as.owin, bounding.box

Examples

Run this code
w <- owin(c(0,10),c(0,10), poly=list(x=c(1,2,3,2,1), y=c(2,3,4,6,7)))
  r <- as.rectangle(w)
  # returns a 10 x 10 rectangle

Run the code above in your browser using DataLab