In many cases the as_mag function will directly create a magnetometer
vector from input data
Usage
as_mag(x, ...)
# Default S3 method
as_mag(x, ...)
# S3 method for class 'move2'
as_mag(
x,
colset = NULL,
min_freq = 1,
merge_continuous = TRUE,
drop = FALSE,
...
)Arguments
- x
A
move2containing magnetometer data. Most of the time this will be either loaded from disk using move2::mt_read or downloaded using move2::movebank_download_study.- ...
currently not used
- colset
An
imu_colsetobject or list ofimu_colsetobjects specifying the columns ofxthat contain magnetometer data. By default, constructs bursts for all column sets that are detected inxthat also contain data (seeactive_mag_colsets()).Several common colsets are listed under
movebank_mag_colsets(). To specify a custom set of columns, useimu_colset().- min_freq
Numeric value indicating the minimum allowable within-burst data collection frequency when identifying bursts in long-format data. Any two adjacent timestamps that fall outside of the period defined by this frequency will be split into separate bursts. If no units are provided, this value is assumed to be in Hz.
Ignored if data are already in predefined bursts.
- merge_continuous
Logical value indicating whether to merge adjacent bursts. Two adjacent bursts can be merged if the first burst ends at the same time that the second starts and the burst frequency is identical between the two. This is useful for processing continuous data that have been stored in chunks split at regular intervals.
- drop
Logical indicating whether empty bursts should be dropped from the output. If
drop = FALSE, then the length of the output will match the number of rows in the input dataxand bursts will be stored at the index location corresponding to the start time of the burst.