readActigraph {PhysicalActivity} | R Documentation |
Read ActiGraph Accelerometer Data
Description
This function reads an ActiGraph AGD file into R as a data frame.
If accelerometer data are collected with three axes, it creates vector magnitude
(vm). The counts at any axis or "vm" can be used to classify with wear and
nonwear time using wearingMarking
.
Usage
readActigraph(datfile, convertTime = TRUE)
Arguments
datfile |
An AGD file. |
convertTime |
Convert the timestamp from a character string into POSIXct. |
Details
AGD files are SQLite databases. This function requires the RSQLite package.
Value
A data frame with accelerometer data.
Author(s)
Cole Beck cole.beck@vumc.org
See Also
wearingMarking
, queryActigraph
Examples
## Not run:
dat <- readActigraph("actfile.agd")
dat1s <- wearingMarking(dataset = dat,
frame = 90,
perMinuteCts = 1,
TS = "TimeStamp",
cts = "axis1",
streamFrame = NULL,
allowanceFrame= 2,
newcolname = "wearing",
getMinuteMarking = FALSE)
## End(Not run)
[Package PhysicalActivity version 0.2-4 Index]