check.nonwear: Check for Non-Wear in Accelerometer Data

View source: R/check_nonwear.R

check.nonwearR Documentation

Check for Non-Wear in Accelerometer Data

Description

Checks for non-wear by checking for long intervals of no change in the signal along each axis.

Usage

check.nonwear(
  data,
  window = 3 * 94 * 60,
  tol = 10,
  tol.upper = 0,
  filter = F,
  minimum.wear.bout = 94 * 60 * 24
)

Arguments

data

Data frame containing the raw accelerometer data. Should include variables time, x, y, z.

window

Number of samples for minimum contiguous period of non-wear. To be passed to accelerometry::weartime.

tol

Number of allowances in any window of non-wear. To be passed to accelerometry::weartime

tol.upper

Maximum allowable sequential change in any window of non-wear. To be passed to accelerometry::weartime

filter

Should nonwear be removed from the data set?

minimum.wear.bout

Minimum contiguous period of wear time for a period to be considered wear.

Value

A data frame with variables time, x, y, z, wear, and wear.bout

- wear = an indicator for whether a person is wearing the device.

- wear.bout = an integer numbering which consecutive period of contiguous device wear a time point corresponds to. 0 indicates nonwear.


etzkorn/postuR documentation built on Nov. 15, 2024, 12:41 a.m.