Creates a square window
square(r=1, unitname=NULL) unit.square()
- Numeric. The side length of the square, or a vector giving the minimum and maximum coordinate values.
- Optional. Name of unit of length. Either a single character string, or a vector of two character strings giving the singular and plural forms, respectively.
r is a number,
is a shortcut for creating a window object
representing the square
$[0,r] \times [0,r]$.
It is equivalent to the command
r is a vector of length 2, then
square(r) creates the square with
unit.square creates the unit square
$[0,1] \times [0,1]$.
It is equivalent to
These commands are included for convenience, and to improve the readability of some code.
- An object of class
owin.object) specifying a window.
W <- square(10) W <- square(c(-1,1))