step.min.AP: Estimate Time Spent Stepping

Description Usage Arguments Value Author(s) See Also Examples

View source: R/step.min.AP.R

Description

This function to calculates the hours spent stepping

Usage

1
step.min.AP(posture, epoch = 1)

Arguments

posture

posture is a vector indicating sitting (0), standing (1) and stepping (2)

epoch

numeric value indicating what epoch (in seconds) the data are in (e.g. 60 = 1 minute epochs). The default value is 1 second

Value

a numeric value indicating hours spent stepping

Author(s)

Kate Lyden

See Also

sed.min.AP stand.min.AP

Examples

1
2
3
4
5
6
7
8
	
data(second.by.second.data)
posture <- second.by.second.data$ap.posture
	
step.min.AP(posture,epoch=1)

# summarize by date
tapply(second.by.second.data$ap.posture, second.by.second.data$date,step.min.AP,epoch=1)

activpalProcessing documentation built on May 2, 2019, 2:17 a.m.