shift {spatstat}R Documentation

Apply Vector Translation

Description

Applies a vector shift of the plane to a geometrical object, such as a point pattern or a window.

Usage

 shift(X, vec=c(0,0))

Arguments

X Any suitable dataset representing a two-dimensional object, such as a point pattern (object of class "ppp"), or a window (object of class "owin").
vec Vector of length 2 representing a translation.

Details

This is generic. Methods are provided for point patterns (shift.ppp) and windows (shift.owin).

The object is translated by the vector vec.

Value

Another object of the same type, representing the result of applying the shift.

Author(s)

Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf

See Also

shift.ppp, shift.owin, rotate, affine

Examples

  data(cells)
  X <- shift(cells, c(2,3))
  ## Not run: 
  plot(X)
  # no discernible difference except coordinates are different
  
## End(Not run)

[Package spatstat version 1.6-4 Index]