g.analyse: Function to analsyse meta-data generated by g.getmeta and...

View source: R/g.analyse.R

g.analyseR Documentation

Function to analsyse meta-data generated by g.getmeta and g.impute

Description

Analyses the output from other functions within the packages to generate a basic descriptive summary for each accelerometer data file. Analyses include: Average acceleration per day, per measurement, L5M5 analyses (assessment of the five hours with lowest acceleration and with highest acceleration). Further, the traditionally popular variable MVPA is automatically extracted in six variants: without bout criteria in combination with epoch = epoch length as defined in g.getmeta (first value of the input argument windowsizes), 1 minute, and 5 minutes, and for bout durations 1 minute, 5 minutes or 10 minutes in combination with the epoch length as defined in g.getmeta.

Usage

  g.analyse(I, C, M, IMP, params_247 = c(), params_phyact = c(),
                      params_general = c(), params_cleaning = c(),
                      quantiletype = 7, myfun = c(), ...)

Arguments

I

the output from function g.inspectfile

C

the output from function g.calibrate

M

the output from function g.getmeta

IMP

the output from function g.impute

params_247

See GGIR

params_phyact

See GGIR

params_general

See GGIR

params_cleaning

See GGIR

quantiletype

type of quantile function to use (default recommended). For details, see quantile function in STATS package

myfun

External function object to be applied to raw data, see g.getmeta.

...

Any argument used in the previous version of g.analyse, which will now be used to overrule the arguments specified with the parameter objects.

Value

g.analyse generated two data,franeL

summary

summary for the file that was analysed

daysummary

summary per day for the file that was analysed

These data.frames are used by function g.report.part2 to generate csv reports. An exaplantion of all the columns in the data.frame and subsequent csv reports can be found in the package vignette (Output part 2).

Author(s)

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

Examples

  data(data.getmeta)
  data(data.inspectfile)
  data(data.calibrate)
  ## Not run: 
    #inspect file:
    I = g.inspectfile(datafile)
    
    #autocalibration:
    C = g.calibrate(datafile) 
    
    #get meta-data:
    M = g.getmeta(datafile, desiredtz = "Europe/London", 
    windowsizes = c(5, 900, 3600),
    daylimit = FALSE, offset = c(0, 0, 0), 
    scale = c(1, 1, 1), tempoffset = c(0, 0, 0))
  
## End(Not run)
  #impute meta-data:
  IMP = g.impute(M = data.getmeta, I = data.inspectfile)
  
  #analyse and produce summary:
  A = g.analyse(I = data.inspectfile, C = data.calibrate,
  M = data.getmeta, IMP)

GGIR documentation built on Oct. 17, 2023, 1:12 a.m.