Description Usage Arguments Value References See Also Examples
Read ActiGraph sleep watch data from a database stored in an AGD file. Return a tibble.
1 |
file |
Full path to an agd file to read. |
tz |
Time zone to convert DateTime ticks to POSIX time. |
A tibble
(tbl
) 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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.