capthist object to create a new
data set, possibly converting between detector types## S3 method for class 'capthist':
reduce(object, columns = NULL, outputdetector =
detector(traps(object)), select='last', dropunused = TRUE,
verify = TRUE, sessions = NULL, ...)capthist objectverify function is applied to the outputcapthist with number of columns equal to
length(occasions). The detector type is inherited from object
unless a new type is specified with the argument outputdetector.columns defines the columns of
object for new occasion 1, the second for new occasion 2, etc. If
columns is NULL then all occasions are output. When the output
detector is one of the trap types ('single', 'multi'), reducing capture
occasions can result in locational ambiguity for individuals caught on
more than one occasion, and for single-catch traps there may also be
conflicts between individuals at the same trap. The method for resolving
conflicts among 'multi' detectors is determined by select which
should be one of 'first', 'last' or 'random'. With 'single' detectors
select is ignored and the method is: first, randomly select* one
trap per animal per day; second, randomly select* one animal per trap
per day; third, when collapsing multiple days use the first capture, if
any, in each trap. With signal detectors, select determines how
multiple signal measurements are combined; options 'min', 'max' or
'mean' are also allowed.
Usage data in the traps attribute are also
pooled if present; a trap is considered 'used' on a pooled occasion if
it was used on any contributing occasion.
* i.e., in the case of a single capture, use that capture; in the case of
multiple 'competing' captures draw one at random.capthist, subset.capthisttempcapt <- sim.capthist (make.grid(nx = 6, ny = 6), nocc = 6)
class(tempcapt)
pooled.tempcapt <- reduce(tempcapt, col = list(1,2:3,4:6))
summary (pooled.tempcapt)Run the code above in your browser using DataLab