Skip to contents

This function estimates the number of sit to stand transitions, where values of 0 indicates sitting, 1 indicates standings, and 2 indicates stepping.

Usage

breaks_ap(posture)

Arguments

posture

A numeric vector (in any EPOCH), where 0 indicates sitting, 1 indicates standings, and 2 indicates stepping.

Value

A numeric value indicating the number of breaks from sitting

Details

This is essentially the same as activpalProcessing::breaks.AP(); however, if there are *NO sit to stand transitations a value of 0 is returned instead of NA.

Examples

x <- sample(x = c(0, 1, 2), size = 100, replace = TRUE, prob = rep(1/3, 3))
breaks_ap(x)
#> [1] 19