rmr_sliding | R Documentation |
Calculate resting metabolic rate using a sliding window method
rmr_sliding( vo2_values, vo2_timestamps, start_time, stop_time, window_size_minutes = 5 )
vo2_values |
numeric vector of oxygen consumption values |
vo2_timestamps |
timestamps corresponding to each element of
|
start_time |
the beginning time of the assessment period |
stop_time |
the ending time of the assessment period |
window_size_minutes |
the size of the sliding window, in minutes |
A data frame giving the oxygen consumption from the lowest window, as well as the time difference from first to last breath in the same window.
set.seed(144) fake_start_time <- Sys.time() fake_stop_time <- fake_start_time + 1800 fake_timestamps <- fake_start_time + cumsum(sample(1:3, 500, TRUE)) fake_timestamps <- fake_timestamps[fake_timestamps <= fake_stop_time] fake_breaths <- rnorm(length(fake_timestamps), 450, 0.5) window_size <- 5 rmr_sliding( fake_breaths, fake_timestamps, fake_start_time, fake_stop_time, window_size )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.