g.readaccfile {GGIR}R Documentation

Generic functiont to read large blocks of accelerometer data

Description

The function is used by g.getmeta and g.calibrate to read large blocks of the accelerometer file, which are processed and then deleted from memory. This is needed for memory management.

Usage

  g.readaccfile(filename, blocksize, blocknumber, selectdaysfile = c(), filequality,
                           decn, ws, PreviousEndPage = 1, inspectfileobject = c(),
                           params_rawdata = c(), params_general = c(), ...)

Arguments

filename

filename

blocksize

Size of blocks (in file pages) to be read

blocknumber

Block number relative to start of file

selectdaysfile

See documentation g.getmeta

filequality

Single row dataframe with columns: filetooshort, filecorrupt, and filedoesnotholdday. All with the value TRUE or FALSE

decn

Character with a dot or a comma, used for interpretting samplefrequency in the file header. decn is derived with g.dotorcomma

ws

Larger windowsize for non-detection, see documentation g.part2

PreviousEndPage

Page number on which previous block ended (automatically assigned within g.getmeta and g.calibrate).

inspectfileobject

Output from the function g.inspectfile.

params_rawdata

See g.part1

params_general

See g.part1

...

Any input arguments needed for function read.myacc.csv if you are working with a non-standard csv formatted files. Furter, any argument used in the previous version of g.readaccfile, which will now be used to overrule the arguments specified with the parameter objects.

Value

Author(s)

Vincent T van Hees <v.vanhees@accelting.com>

Examples

  ## Not run: 
    filequality = data.frame(filetooshort = FALSE, filecorrupt = FALSE,
    filedoesnotholdday = FALSE)
    output = g.readaccfile(filename = "C:/myfile.bin", 
    blocksize = 20000, blocknumber = 1,
    selectdaysfile = c(), filequality = filequality,
    decn = ".", dayborder = 0, PreviousEndPage = c()) 
  
## End(Not run)

[Package GGIR version 2.7-1 Index]