This function uses acceleration data to classify migratory flights. The function uses a
k=2
mean clustering (kmeans()
) to identify high activity periods. Periods lasting more than
min_duration
are then considered to be migratory flight.
Arguments
- tag
a GeoPressure
tag
object.- min_duration
Minimal duration (in minutes) to consider a high activity as migratory flight.
Value
Same data logger list than input tag
, but with the column label
filled with
"flight"
in the acceleration data.frame when a sustained high-activity period is detected.
Details
This function is inspired by the function classify_flap
from the
PAMlr package.
See also
Other tag_label:
tag_label()
,
tag_label_read()
,
tag_label_stap()
,
tag_label_write()
Examples
setwd(system.file("extdata", package = "GeoPressureR"))
tag <- tag_create("18LX", quiet = TRUE)
tag <- tag_label_auto(tag, min_duration = 15)
str(tag$acceleration)
#> 'data.frame': 4032 obs. of 3 variables:
#> $ date : POSIXct, format: "2017-07-27 00:00:00" "2017-07-27 00:05:00" ...
#> $ value: int 0 0 0 0 0 0 0 0 0 0 ...
#> $ label: chr [1:4032(1d)] "" "" "" "" ...