Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not
g.part4.RdCombines output from g.part3 and guider information to estimate sleep variables. See vignette paragraph "Sleep and full day time-use analysis in GGIR" for an elaborate descript of the sleep detection.
Arguments
- datadir
Directory where the accelerometer files are stored, e.g. "C:/mydata", or list of accelerometer filenames and directories, e.g. c("C:/mydata/myfile1.bin", "C:/mydata/myfile2.bin").
- 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)
- params_sleep
List of parameters used for sleep analysis (GGIR part 3, 4, and 5): see documentation g.part3.
- params_metrics
List of parameters used for metrics extraction (GGIR part 1): see documentation g.part1.
- params_cleaning
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.
Value
The function does not produce values but generates an RData file
in the milestone subfolder ms4.out which incudes a dataframe
named nightsummary. This dataframe is used in g.report.part4 to create
two reports one per night and one per person. See package vignette
paragraph "Output part 4" for description of all the variables.