sb_bout_dist | R Documentation |
Extract features to summarize a participant's bout duration distribution
sb_bout_dist( df = NULL, is_sb, is_wear, min_bout = 5, valid_indices = NULL, id = NULL, counts = NULL, wear = NULL, sb = 100, simplify = TRUE, probs = c(0.1, 0.2, 0.25, seq(0.3, 0.7, 0.1), 0.75, 0.8, 0.9) )
df |
data frame of accelerometer input |
is_sb |
logical vector reflecting minute-by-minute classifications
( |
is_wear |
logical vector reflecting minute-by-minute wear
classifications ( |
min_bout |
integer scalar. Threshold for a run to qualify as a bout |
valid_indices |
integer vector (optional) specifying which indices of
|
id |
character scalar (optional). Column name on which to divide
|
counts |
character scalar. Column name of the variable to use when classifying sedentary behavior (and wear time, depending on the function) |
wear |
character scalar [optional]. Column name of the variable to use
for determining wear time (logical vector with |
sb |
integer. The cut point to use for classifying sedentary behavior |
simplify |
logical. If passing a data frame, setting to |
probs |
numeric vector. Percentiles to calculate (all values must be between 0 and 1) |
This function can be used in one of two ways, either 1) by directly
providing values for is_sb
and is_wear
(with df =
NULL
), or 2) by providing values for df
and counts
(optionally with wear
as well).
A bout object (data frame of distribution features)
data(example_data, package = "SBprofiles") sb_bout_dist( is_sb = example_data$PAXINTEN <= 100, is_wear = nhanes_wear(example_data$PAXINTEN) ) sb_bout_dist( example_data, id = "PAXDAY", counts = "PAXINTEN" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.