| readActigraph {PhysicalActivity} | R Documentation |
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.
readActigraph(datfile, convertTime = TRUE)
datfile |
An AGD file. |
convertTime |
Convert the timestamp from a character string into POSIXct. |
AGD files are SQLite databases. This function requires the RSQLite package.
A data frame with accelerometer data.
Cole Beck cole.beck@vumc.org
wearingMarking, queryActigraph
## 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)