plotData function

Plot Accelerometer Data over Time

Plot Accelerometer Data over Time

This function makes plot for accelerometer collected data (counts) over time for the whole monitor period, or a user specified time period or day with a midnight marking to separate monitored days.

plotData( data, day = NULL, start = NULL, end = NULL, cts = getOption("pa.cts"), TS = getOption("pa.timeStamp"), summary = NULL )

Arguments

  • data: Data with classified wear and nonwear status from wearingMarking.
  • day: A part of data during a user specified day for plot.
  • start: Define a starting time for plot.
  • end: Define a ending time for plot.
  • cts: The name of the counts column. The default is "axis1".
  • TS: The column name for timestamp. The default is "TimeStamp".
  • summary: List output of summaryData function.

Returns

Plot with midnight marking.

Details

If a local time-zone is specified for wearkingMarking, it is possible that daylight savings starts or ends during the period shown. In this case a dotted line will indicate its position and the appropriate time-zone abbreviations will be included.

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") ## change "cts" default from "axis1" to "counts" options(pa.cts = "counts") ## plot the whole data plotData(data=data1m) ## plot the data from 60 min to 900 min plotData(data=data1m, start=60, end=900) ## plot the data for day 2 plotData(data=data1m, day=2) ## include summaryData sumdat <- summaryData(data=data1m) plotData(data=data1m, summary=sumdat) ## present daylight saving time change data(deliveryData) options(pa.cts = "vm") wm <- wearingMarking(dataset = deliveryData, TS="TimeStamp", tz="America/Chicago") sumdat <- summaryData(wm) plotData(data=wm, summary = sumdat) ## valid data after delivery marking del <- markDelivery(wm) sumdat <- summaryData(wm, delivery = del) plotData(data=wm, summary = sumdat)

See Also

wearingMarking, sumVct, summaryData

Author(s)

Leena Choi leena.choi@Vanderbilt.Edu

  • Maintainer: Leena Choi
  • License: GPL (>= 3)
  • Last published: 2021-01-22

Useful links