sumVct {PhysicalActivity}R Documentation

Summarize Wear and Nonwear Time Interval

Description

This function summarizes the classified wear (nonwear) time by interval basis from the epoch-by-epoch classified wear (nonwear) status classified by wearingMarking.

Usage

sumVct(
  datavct,
  wearing = "wearing",
  TS = getOption("pa.timeStamp"),
  markingString = "w",
  by = "days",
  id = NULL
)

Arguments

datavct

Data with classified wear (nonwear) status classified by wearingMarking.

wearing

The column name for classified wear and nonwear status. The default is "wearing".

TS

The column name for timestamp. The default is "TimeStamp".

markingString

Option for summarizing wear (markingString="w") or nonwear time interval (markingString="nw").

by

A sequence of days for classified wear (nonwear) time intervals.

id

Optional output for subject identification or file name.

Value

The summary data for wear and nonwear time intervals.

Author(s)

Leena Choi leena.choi@Vanderbilt.Edu, Cole Beck cole.beck@vumc.org, Zhouwen Liu zhouwen.liu@vumc.org, Charles E. Matthews Charles.Matthews2@nih.gov, and Maciej S. Buchowski maciej.buchowski@Vanderbilt.Edu

References

Choi L, Liu Z, Matthews CE, Buchowski MS. Validation of accelerometer wear and nonwear time classification algorithm. Med Sci Sports Exerc. 2011 Feb;43(2):357-64.

See Also

wearingMarking, summaryData

Examples


data(dataSec)

mydata1m = dataCollapser(dataSec, TS = "TimeStamp", col = "counts", by = 60)

data1m = wearingMarking(dataset = mydata1m,
                       frame = 90, 
                       perMinuteCts = 1,
                       TS = "TimeStamp",
                       cts = "counts", 
                       streamFrame = NULL, 
                       allowanceFrame= 2, 
                       newcolname = "wearing")

sumVct(data1m, id="sdata1m")
sumVct(data1m, id="sdata1m", markingString = "nw")

[Package PhysicalActivity version 0.2-4 Index]