View source: R/tag_label_stap.R
tag_label_stap | R Documentation |
This function computes the stationary periods from the pressure and/or acceleration label data.
In most case, this function should be run directly after tag_label_read()
in order to update
tag
to correspond to the new label file.
A stationary period is a period during which the bird is considered static relative to the
spatial resolution of interest (~10-50km). They are defined by being separated by a flight of any
duration (label "flight"
). The stap_id
is an integer value for stationary periods and decimal
value for flight. The stap_id
is added as a new column to each sensor data.
If an acceleration data.frame is present and contains a column label
, the stationary period
will be computed from it, otherwise, it uses the pressure data.frame.
tag_label_stap(
tag,
quiet = FALSE,
warning_flight_duration = 2,
warning_stap_duration = 6
)
tag |
a GeoPressure |
quiet |
logical to display warning message. |
warning_flight_duration |
Threshold of flight duration to display warning for (hours) |
warning_stap_duration |
Threshold of stationary period duration to display warning for (hours) |
tag
is return with (1) a new data.frame of stationary periods tag$stap
and (2) a new
column stap_id
for each sensor data.
Other tag_label:
tag_label()
,
tag_label_auto()
,
tag_label_read()
,
tag_label_write()
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |>
tag_label_read()
tag <- tag_label_stap(tag)
str(tag)
str(tag$stap)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.