flag_choi_HR: Apply Choi et al nonwear algorithm to HR

View source: R/flag_choi.R

flag_choi_HRR Documentation

Apply Choi et al nonwear algorithm to HR

Description

Apply Choi et al nonwear algorithm to HR

Usage

flag_choi_HR(
  HR,
  min_period_len = 90,
  spike_tolerance = 2,
  min_window_len = 30,
  window_spike_tolerance = 0
)

Arguments

HR

a numeric vector containing Fitbit HR for a subject.

min_period_len

same as in flag_choi().

spike_tolerance

same as in flag_choi().

min_window_len

same as in flag_choi().

window_spike_tolerance

same as in flag_choi().

Details

Modifying activity_threshold param is not optional because the presence of HR is binary.

Value

nonwear vector, non wear time encoded as T, and wear time encoded as F.

Examples

## Not run: 
minute_data %>%
  group_by(id) %>%
  mutate(HR = flag_choi_HR(HR))

## End(Not run)

audiracmichelle/fitibble documentation built on Feb. 2, 2023, 3:51 p.m.