spatstat (version 1.11-1)

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

Value

  • Another line segment pattern (of class "psp") representing the result of applying the vector shift.

Details

The line segment pattern, and its window, are translated by the vector vec. This is a method for the generic function shift.

See Also

shift, shift.owin, shift.ppp, rotate, affine

Examples

Run this code
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")

Run the code above in your browser using DataCamp Workspace