readActigraph: Read ActiGraph Accelerometer Data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/readActigraph.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

PhysicalActivity documentation built on Jan. 23, 2021, 1:06 a.m.