Last chance! 50% off unlimited learning
Sale ends in
Creates a square window
square(r=1, unitname=NULL)
unit.square()
An object of class "owin"
(see owin.object
)
specifying a window.
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.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner rolfturner@posteo.net
If r
is a number, square(r)
is a shortcut for creating a window object
representing the square
owin(c(0,r),c(0,r))
.
If r
is a vector of length 2, then
square(r)
creates the square with x
and y
coordinates
ranging from r[1]
to r[2]
.
unit.square
creates the unit square
square(1)
or square()
or owin(c(0,1),c(0,1))
.
These commands are included for convenience, and to improve the readability of some code.
owin.object
,
owin
W <- square(10)
W <- square(c(-1,1))
Run the code above in your browser using DataLab