readGenea: Function to read binary files as produced by the...

View source: R/readGenea.R

readGeneaR Documentation

Function to read binary files as produced by the accelerometer named 'Genea', not to be confused with the 'GENEActiv' (see package GENEAread for this)

Description

For reading the binary data as collected with a Genea accelerometer (Unilever Discover, UK). For reading GENEActive binary data, see package GENEAread.

Usage

  readGenea(filename, start = 0, end = 0)

Arguments

filename

filename (required)

start

start point for reading data, this can either be a timestamp in POSIXct format "year-month-day hr:min:sec" or a page number (optional)

end

end point for reading data, this can either be a timestamp in POSIXct format "year-month-day hr:min:sec" or a page number (optional)

Details

If only start is defined then readGenea will read all data beyond start until the end of the file is reached

Value

rawxyz

matrix with raw x, y, and, z acceleration values

header

file header

timestamps1

timestamps for rawxyz in seconds since 1970-01-01 00:00

timestamps2

timestamps for rawxyz in day time format

batt.voltage

matrix with battery voltage and corresponding timestamps

Author(s)

Vincent T van Hees <v.vanhees@accelting.com> Jing Hua Zhao <jinghua.zhao@mrc-epid.cam.ac.uk>

Examples

  geneafile  = system.file("testfiles/genea_testfile.bin", package = "GGIRread")[1]
  GENEA = readGenea(filename = geneafile, start = 0, end = 2)

GGIRread documentation built on Oct. 12, 2023, 1:06 a.m.