shift {secr}R Documentation

Shift Points

Description

Translate an array of points.

Usage

shift (object, shiftxy, ...)

Arguments

object a 2-column matrix or object that can be coerced to a matrix
shiftxy vector of x and y displacements
... other arguments (not used)

Details

This is a generic function. The default method is redundant, but the method for traps objects may be useful.

Value

A matrix with the location of each point shifted by the desired amount.

Author(s)

Murray Efford murray.efford@otago.ac.nz

See Also

rotate, flip

Examples

temp <- matrix(runif (20) * 2 - 1, nc = 2)
temp2 <- shift(temp, c(0.1, 0.1))
plot(temp, xlim=c(-1.5,1.5), ylim = c(-1.5,1.5), pch = 16)
points (0,0, pch=2)
points (temp2, pch = 1)
arrows (temp[,1], temp[,2], temp2[,1], temp2[,2], length = 0.1) 

[Package secr version 1.2.11 Index]