Learn R Programming

spatstat (version 1.11-4)

shift.im: 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

Value

  • Another pixel image (of class "im") representing the result of applying the vector shift.

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.

See Also

shift

Examples

Run this code
# 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

Run the code above in your browser using DataLab