Internal | R Documentation |
Functions that are called internally by secrdesign. These are exported and may be called separately for testing.
compactSample (traps, n)
GApenfn(traps, sigma)
traps |
secr trapsobject |
n |
integer number in sample ( |
sigma |
numeric sparial scale parameter |
compactSample
selects a detector at random and returns the a compact subset of surrounding detectors.
GApenfn
is the default pen_fn used by GAoptim
When called with a non-null penalty argument.
GApenfn – a numeric vector with the number of trap pairs separated by 2.5-3.5 sigma and 3.5-4.5 sigma.
compactSample – an object like traps, but with only n rows.
Durbach, I., Borchers, D., Sutherland, C. and Sharma, K. (2021) Fast, flexible alternatives to regular grid designs for spatial capture–recapture. Methods in Ecology and Evolution 12, 298–310. DOI 10.1111/2041-210X.13517
GAoptim
,
CStraps <- compactSample(traps(captdata), n = 20)
plot(traps(captdata))
plot(CStraps, add = TRUE, detpar = list(fg = 'blue',pch = 16))
GApenfn(CStraps, sigma = 25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.