Read ActiGraph sleep watch data from a database stored in an AGD file. Return a tibble. (Code is from actigraph.sleepr package https://github.com/dipetkov/actigraph.sleepr/. See LICENSE.note file in the app skeleton.)
Value
A tibble of activity data with at
least two columns: timestamp and axis1 counts. Optional columns
include axis2, axis2, steps, lux and inclinometer indicators
(incline off, standing, sitting and lying). The device settings
are stored as attributes, which include epochlength.
References
The AGD file format is described in the ActiLife 6 Manual. chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://6407355.fs1.hubspotusercontent-na1.net/hubfs/6407355/Product%20Manuals/ActiLife%206%20Users%20Manual%20-%20Rev-A-110315.pdf/
Examples
file <- system.file("extdata", "acc.agd",
package = "activAnalyzer"
)
read_agd(file)
#> # A tibble: 41,400 × 10
#> timestamp axis1 axis2 axis3 steps lux inclineoff inclinestanding
#> * <dttm> <int> <int> <int> <int> <int> <int> <int>
#> 1 2021-04-07 06:00:00 0 0 0 0 0 10 0
#> 2 2021-04-07 06:00:10 0 0 0 0 0 10 0
#> 3 2021-04-07 06:00:20 0 0 0 0 0 10 0
#> 4 2021-04-07 06:00:30 0 0 0 0 0 10 0
#> 5 2021-04-07 06:00:40 0 0 0 0 0 10 0
#> 6 2021-04-07 06:00:50 0 0 0 0 0 10 0
#> 7 2021-04-07 06:01:00 0 0 0 0 0 10 0
#> 8 2021-04-07 06:01:10 0 0 0 0 0 10 0
#> 9 2021-04-07 06:01:20 0 0 0 0 0 10 0
#> 10 2021-04-07 06:01:30 0 0 0 0 0 10 0
#> # ℹ 41,390 more rows
#> # ℹ 2 more variables: inclinesitting <int>, inclinelying <int>
