This functions identifies sequences of zeroes of a given length to classify wear and non-wear time in accelerometer data files.
markwear(object, value, which = "counts", rescale.epoch = 60,
nz = 0, keep.error = FALSE, progbar = TRUE)
# S3 method for acclist
markwear(object, value, which = "counts", rescale.epoch = 60,
nz = 0, keep.error = FALSE, progbar = TRUE)
# S3 method for accfile
markwear(object, value, which = "counts", rescale.epoch = 60,
nz = 0, keep.error = FALSE, progbar = NULL)
If object
is of class acclist
, a list of factors with two levels of the same length as the number of accelerometers files in object
. If object
is of class accfile
, a single factor will be given. Levels are 'non-wear' and 'wear'.
an object of class acclist
or accfile
.
the length of the time window (in minutes) which contains zero values.
either 'counts' or 'steps' for gt1m
files or one of c('x','y','z','steps')
for gt3x
files.
epoch expressed in the same unit as acceleromenter epoch to determine multiplier to rescale value
(default is 60). See details.
the length of the time window (in minutes) of non-zero value sequences allowed between every two sequences of zero values.
logical flag. If FALSE
(default) data errors as identified by errorChk
will be replaced by NAs.
logical flag. Should a progress bar be used? Available for Windows only. Argument not used for class accfile
.
Marco Geraci
The accelerometer epoch is assumed to be expressed in seconds. Therefore value
is automatically rescaled to value * 60/object$info$epoch
.
Geraci M, Rich C, Sera F, Cortina-Borja M, Griffiths LJ, and Dezateux C (2012). Technical report on accelerometry data processing in the Millennium Cohort Study. London, UK: University College London. Available at https://discovery.ucl.ac.uk/1361699
readAccDir