Detection of sustained inactivity periods as needed for sleep detection in g.part4.
g.part3.RdFunction called by function GGIR. It estimates the sustained inactivity periods in each day, which are used as input for g.part4 which then labels them as nocturnal sleep or day time sustained inactivity periods. Typical users should work with function GGIR only.
Arguments
- metadatadir
Directory that holds a folder 'meta' and inside this a folder 'basic' which contains the milestone data produced by g.part1. The folderstructure is normally created by g.part1 and GGIR will recognise what the value of metadatadir is.
- f0
File index to start with (default = 1). Index refers to the filenames sorted in alphabetical order
- f1
File index to finish with (defaults to number of files available, i.e., f1 = 0)
- myfun
External function object to be applied to raw data. See details applyExtFunction.
- params_sleep
See details in GGIR.
- params_metrics
See details in GGIR.
- params_output
See details in GGIR.
- params_general
See details in GGIR.
- verbose
See details in GGIR.
- ...
To ensure compatibility with R scripts written for older GGIR versions, the user can also provide parameters listed in the params_ objects as direct argument.
Details
GGIR comes with many processing parameters, which have been thematically grouped in parameter objects (R list). By running print(load_params()) you can see the default values of all the parameter objects. When g.part 3 is used via GGIR you have the option to specifiy a configuration file, which will overrule the default parameter values. Further, as user you can set parameter values as input argument to both g.part3 and GGIR. Directly specified argument overrule the configuration file and default values.
See the GGIR package vignette or the details section in GGIR for a more elaborate overview of parameter objects and their usage across GGIR.
Value
The function provides no values, it only ensures that other functions are called and that their output is stored in .RData files.
nightnightnumberdefinitiondefinition of sustained inactivity. For example, T10A5 refers to 10 minute window and a 5 degree angle (see paper for further explaination).start.time.daytimestamp when the day startednsib.periodsnumber of sustained inactivity boutstot.sib.dur.hrstotal duration of all sustained inactivity boutsfraction.night.invalidfraction of the night for which accelerometer data was invalid, e.g. monitor not wornsib.periodnumber of sustained inactivity periodsib.onset.timeonset time of sustained inactivity periodsib.end.timeend time of sustained inactivity period