shift.im {spatstat}R Documentation

Apply Vector Translation To Pixel Image

Description

Applies a vector shift to a pixel image

Usage

 ## S3 method for class 'im':
 shift(X, vec=c(0,0), ...)

Arguments

X Pixel image (object of class "im").
vec Vector of length 2 representing a translation.
... Ignored

Details

The spatial location of each pixel in the image is translated by the vector vec. This is a method for the generic function shift.

Value

Another pixel image (of class "im") representing the result of applying the vector 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

Examples

 # make up an image
 X <- setcov(unit.square())
 plot(X)

 Y <- shift(X, c(10,10))
 plot(Y)
 # no discernible difference except coordinates are different
  

[Package spatstat version 1.11-3 Index]