read_agd | R Documentation |
Read ActiGraph sleep watch data from a database stored in an AGD file. Return a tibble.
read_agd(file, tz = "UTC")
file |
Full path to an agd file to read. |
tz |
Time zone to convert DateTime ticks to POSIX time. |
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
.
The AGD file format is described in the ActiLife 6 Manual. https://actigraphcorp.com/support/manuals/actilife-6-manual/
read_agd_raw()
file <- system.file("extdata", "GT3XPlus-RawData-Day01.agd", package = "actigraph.sleepr" ) read_agd(file) library("dplyr") library("purrr") # Read ActiGraph sleep watch data from the AGD files in a directory # and bind the data into one data frame indexed by `.filename`. path <- system.file("extdata", package = "actigraph.sleepr") list.files(path, pattern = "*.agd", full.names = TRUE) %>% map_dfr(read_agd, .id = ".filename")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.