Learn R Programming

secr (version 1.3.0)

shift.traps: Shift Detectors

Description

Translate detectors while retaining other attributes.

Usage

## S3 method for class 'traps':
shift(object, shiftxy, \dots)

Arguments

object
object of class traps
shiftxy
vector with displacements in x and y directions
...
other arguments (not used)

Value

  • An object of class traps with the location of each detector shifted by the desired amount.

Details

May be used with rbind.traps and rotate.traps to create complex geometries.

See Also

traps, rotate.traps, flip.traps

Examples

Run this code
hollow1 <- make.grid(nx = 8, ny = 8, hollow = TRUE)
hollow2 <- shift(make.grid(nx = 6, ny = 6, hollow = TRUE), c(20, 20))
nested <- rbind (hollow1, hollow2)
plot(nested, gridlines = FALSE, lab = TRUE)

Run the code above in your browser using DataLab