Learn R Programming

pawacc (version 1.2.3)

dateSummary: Date summary for accelerometer files

Description

This function provides a date summary for Actigraph GT1M accelerometer files.

Usage

dateSummary(object, wear, timestamp, minval = 0,
rescale.epoch = 60, keep.error = FALSE)

Value

A data frame containing the following variables

fileid

file identifier

days

dates by calendar day

freq

frequency of accelerometer observations in each day

hour_day

total hours of accelerometer observations in each day

start_day

starting time of accelerometer observations

end

end time of accelerometer observations

valid_mins

wear time (minutes)

IsStartDate

dummy variable to define starting date (1 = yes)

IsEndDate

dummy variable to define end date (1 = yes)

IsTruncated

dummy variable to define truncated date (1 = yes)

Arguments

object

an object of class gt1m.

wear

a vector that classifies wear and non-wear time. See markwear.accfile.

timestamp

a timestamp vector for accelerometer values that can be provided by tsFormat.

minval

threshold defining the minimum number of minutes to identify first and last days. See details.

rescale.epoch

epoch expressed in the same unit as acceleromenter's epoch to determine minutes of wear time (default is 60 and assumed to be in seconds).

keep.error

logical flag. If FALSE (default) data errors as identified by errorChk will be replaced by NAs.

Author

Marco Geraci

Details

Based on total wear time (in minutes) for each day, the theshold minval is applied to identify the first and last days. For example, if accelerometers are sent by post to collect survey data, the first and last days in which the accelerometer was worn might not be known. Days before the first and those after the last day (truncated days) are discarded by collapse.accfile.

References

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

See Also

collapse.accfile