Drop Points Distant From Detectors
clipmask
may be used to drop superfluous points from a mask
(those further than buffer
from any detector).
clipmask(mask, traps, buffer = 100, clipvert = FALSE)
traps |
‘traps’ object from secr |
mask |
‘linearmask’ object |
buffer |
network distance for retaining mask points (m) |
clipvert |
logical; if TRUE the underlying lines are also clipped |
None yet.
‘linearmask’ object retaining only points within buffer
m of
any trap. By default, the ‘SLDF’ attribute is
unchanged.
clipvert = TRUE
causes the attribute “SLDF” (a
SpatialLinesDataFrame) to be clipped to within spacing/2 of detectors,
using functions from rgeos (Bivand and Rundel 2014).
Bivand, R. and Rundel, C. (2014) rgeos: Interface to Geometry Engine - Open Source (GEOS). R package version 0.3-4. https://CRAN.R-project.org/package=rgeos/
x <- seq(0, 4*pi, length = 200) xy <- data.frame(x = x*100, y = sin(x)*300) mask <- read.linearmask(data = xy, spacing = 20) ## clipmask trps <- make.line(mask, n = 15, startbuffer = 1000, by = 30) newmask <- clipmask(mask, trps, buffer = 200) plot(newmask) plot(trps, add = TRUE) if (require('rgeos')) { newmask <- clipmask(mask, trps, buffer = 200, clipvert = TRUE) plot(newmask) plot(trps, add = TRUE) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.