sumVct: Summarize Wear and Nonwear Time Interval

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/sumVct.R

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

1
2
3
4
5
6
7
8
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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")

PhysicalActivity documentation built on Jan. 23, 2021, 1:06 a.m.