Learn R Programming

secr (version 1.3.0)

flip.traps: Flip Detector Array

Description

Flip a detector array about a vertical or horizontal axis.

Usage

## S3 method for class 'traps':
flip(object, lr = F, tb = F, ...)

Arguments

object
a 2-column matrix or object that can be coerced to a matrix
lr
either logical for whether array should be flipped left-right, or numeric value for x-coordinate of axis about which it should be flipped left-right
tb
either logical for whether array should be flipped top-bottom, or numeric value for y-coordinate of axis about which it should be flipped top-bottom
...
other arguments (not used)

Value

  • Object of class traps with the coordinates of each point reflected about the desired axis or axes.

Details

Logical values for lr or tb indicate that points should be flipped about the mean on the relevant axis. Numeric values indicate the particular axis value(s) about which points should be flipped. The default arguments result in no change.

See Also

traps, rotate.traps, shift.traps

Examples

Run this code
par(mfrow=c(1,2), xpd = TRUE)
traps1 <- make.grid(nx = 8, ny = 6, ID = 'numxb')
traps2 <- flip (traps1, lr = TRUE)
plot(traps1, border = 5, lab = TRUE, offset = 7, gridl = FALSE)
plot(traps2, border = 5, lab = TRUE, offset = 7, gridl = FALSE)

Run the code above in your browser using DataLab