traps
with detector locations from a text file or data frame. Usage per occasion and covariates may be included.read.traps(file = NULL, data = NULL, detector = "multi", covnames =
NULL, binary.usage = TRUE, ...)
read.table
traps
comprising a data frame of x- and
y-coordinates, the detector type (`single', `multi', `proximity',
`count', `polygon' etc.), and possibly other attributes.file
is missing then x-y coordinates will be taken instead
from data
. This option does not allow for covariates
or
usage
, but they maybe added later.
detector
specifies the behaviour of the detector following Efford
et al. (2009). `single' refers to a trap that is able to catch at most
one animal at a time; `multi' refers to a trap that may catch more than
one animal at a time. For both `single' and `multi' detectors a trapped
animals can appear at only one detector per occasion. Detectors of type
`proximity', such as camera traps and hair snags for DNA sampling, allow
animals to be recorded at several detectors on one occasion. See
detector
for further detector types.
For polygon and transect detector types, each line corresponds to a
vertex and starts with a code to identify the polygon or transect (hence
the same code appears on 2 or more lines). For input from a dataframe
the code column should be named `polyID'. Also, usage and covariates
are for the polygon or transect as a whole and not for each
vertex. Usage and covariates are appended to the end of the line, just
as for point detectors (traps etc.). The usage and covariates for each
polygon or transect are taken from its first vertex. Although the
end-of-line strings of other vertices are not used, they cannot be blank
and should use the same spacing as the first vertex.traps
, make.grid
, detector
## Replace file name with a valid local name and remove '#'
# read.traps ("c:\\\\myfolder\\\\mytraps.txt", detector="proximity")
## \mytraps.txt' should have lines like this
# 1 365 365
# 2 365 395
# 3 365 425
# etc.
Run the code above in your browser using DataLab