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

square

Square Window


Description

Creates a square window

Usage

square(r=1, unitname=NULL)
 unit.square()

Arguments

r

Numeric. The side length of the square, or a vector giving the minimum and maximum coordinate values.

unitname

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.

Details

If r is a number, square(r) is a shortcut for creating a window object representing the square [0,r] * [0,r]. It is equivalent to the command 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 [0,1] * [0,1]. It is equivalent to 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.

Value

An object of class "owin" (see owin.object) specifying a window.

Author(s)

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

See Also

Examples

W <- square(10)
 W <- square(c(-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.