secrdesign-internal: Internal Functions

InternalR Documentation

Internal Functions

Description

Functions that are called internally by secrdesign. These are exported and may be called separately for testing.

Usage


compactSample (traps, n)

GApenfn(traps, sigma)

Arguments

traps

secr trapsobject

n

integer number in sample (0 < n \le ntraps)

sigma

numeric sparial scale parameter

Details

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.

Value

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.

References

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

See Also

GAoptim,

Examples


CStraps <- compactSample(traps(captdata), n = 20)

plot(traps(captdata))
plot(CStraps, add = TRUE, detpar = list(fg = 'blue',pch = 16))

GApenfn(CStraps, sigma = 25)


secrdesign documentation built on March 31, 2023, 10:25 p.m.