Flag Spikes
Usage
flag_spike(df, spike_size = 11)
flag_interval_jump(df, verbose = FALSE)
flag_spike_second(df, spike_size = 11)
flag_device_limit(df, dynamic_range = NULL, epsilon = 0.05)
flag_contiguous_device_limit(df, dynamic_range = NULL, epsilon = 0.05)
flag_same_value(df, min_length = 1)
flag_all_zero(df, min_length = 3)
flag_impossible(df, min_length = 6)Arguments
- df
A data set of actigraphy
- spike_size
size of "spike" - which is the absolute difference in contiguous observations on a single axis
- verbose
print diagnostic messages
- dynamic_range
dynamic range of the device, used to find the device limit.
- epsilon
A small adjustment so that if values are within the device limit, but minus epsilon, still flagged as hitting the limit. For example, if `dynamic_range = c(-6, 6)` and `epsilon = 0.05`, then any value <= `-5.95` or `>= 5.95` gravity units will be flagged
- min_length
minimum length of the condition for contiguous samples. If `min_length = 3`, then at least 3 `TRUE`s in a row is required, any stretches of single `TRUE` values or 2 `TRUE` followed by `FALSE`, will be set to `FALSE`.