spatstat (version 1.25-0)

expand.owin: Expand Window By Factor

Description

Expands the bounding box of a window by a given factor.

Usage

expand.owin(W, f=1)

Arguments

W
A window.
f
Scalar factor for expansion of the area of the window.

Value

  • A rectangular window.

Details

The argument w should be a window (an object of class "owin", see owin.object for details) or can be given in any format acceptable to as.owin().

The bounding box of the window W is expanded by a scale factor equal to the square root of f in both the $x$ and $y$ directions, so that the area increases by a factor f. The centre of this expanded rectangle is the same as the centre of the original bounding box. The expanded rectangle is returned.

This quirky little function exists mainly for reference, as it is the rule for calculating window expansion in our implementation of the Metropolis-Hastings algorithm rmh.default.

For general transformations of the scale, location and orientation of a window, see shift, affine and rotate.

See Also

owin, as.owin, shift, rotate, affine

Examples

Run this code
w <- square(1)
  expand.owin(w, 9)
  # returns the square [-1,2] x [-1,2]

Run the code above in your browser using DataCamp Workspace