shift.psp {spatstat}R Documentation

Apply Vector Translation To Line Segment Pattern

Description

Applies a vector shift to a line segment pattern.

Usage

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

Arguments

X Line Segment pattern (object of class "psp").
vec Vector of length 2 representing a translation.
... Ignored

Details

The line segment pattern, and its window, are translated by the vector vec.

This is a method for the generic function shift.

Value

Another line segment pattern (of class "psp") 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, shift.owin, shift.ppp, rotate, affine

Examples

  X <- psp(runif(10), runif(10), runif(10), runif(10), window=owin())
  plot(X, col="red")
  Y <- shift(X, c(0.05,0.05))
  plot(Y, add=TRUE, col="blue")

[Package spatstat version 1.11-3 Index]