Description Usage Arguments Details Value Note Author(s) See Also Examples
Condense detections or peaks from a number of templates (of the same detection type); events that occur within an adjustable time buffer of one another are assumed to be duplicate detections. In such cases the event with the highest score is saved. Functions with detections for a single species or multiple species.
1 | timeAlign(x, what = "detections", tol = 1)
|
x |
An object of class |
what |
Character, in |
tol |
Numeric value for tolerance, with units seconds. If a detected event is within this value (actually +/- 0.5 |
If input is an object of class detectionList
, a single data frame, or list of either file paths or data frames. Must be called for each survey.
Returns a single data frame of detections (the input x
) with duplicated events removed, leaving only the event that had the highest score.
Events are assumed to be duplicated if they co-occur within a time duration of tol
, but they are only compared to the event above and below when ordered by time. Events with similar times can be spuriously discarded if tol
is set larger than the separation of unrelated peaks. Excessive deletion of events may also occur if the value for tol
is set larger than the duration of the template. Note that in this function tol
specifies seconds, whereas in findPeaks
tol
specifies a ratio.
Jon Katz
The function eventEval
operates similarly, but rather than merge detection results from multiple templates it compares them to known events and reports the True +, True -, False +, and False - rates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ## Not run:
# Not run because it will create files in user's working directory
data(survey)
data(btnw)
writeWave(btnw, "btnw.wav")
btnw2 <- cutw(survey, from = 0.75, to = 3)
writeWave(btnw2, "btnw2.wav")
# Template construction
btnw1 <- makeBinTemplate(
"btnw.wav",
frq.lim = c(2, 8),
select = "auto",
name = "btnw1",
buffer = 4,
amp.cutoff = -31,
binary = TRUE)
btnw2 <- makeBinTemplate(
"btnw2.wav",
frq.lim = c(2, 8),
select = "auto",
name = "btnw2",
buffer = 4,
amp.cutoff = -24,
binary = TRUE)
# Join templates
btnw <- combineBinTemplates(btnw1, btnw2)
# Binary point matching
scores <- binMatch(survey = survey, templates = btnw, time.source = 'fileinfo')
# Isolate peaks
pks <- findPeaks(scores)
# View detections
getDetections(pks)
# Compare to output of timeAlign
timeAlign(pks)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.