process_files collects information about your study sample and reprocesses the files accordingly.

process_files(
  datadir,
  outputdir,
  studyname = "NA",
  ages = c("children", "adults"),
  device = c("geneactiv", "actigraph"),
  wear_location = "wrist",
  overwrite = FALSE,
  verbose = TRUE,
  redo = FALSE,
  ...
)

Arguments

datadir

The directory with the files to process or a vector of file paths to process (as per GGIR::g.shell.GGIR()).

outputdir

the directory to store the output (as per GGIR::g.shell.GGIR()).

studyname

The name of the study. Only used if datadir is a vector of files.

ages

The age of the sample. Can be either "children" (for those 18 or less), "adults" (for >18) or both (i.e., c("children", "adults")). If you do not specify, both are used.

device

The device used in the study. Can be either "geneactiv", "actigraph" or (in the unlikely event two devices were used) both (i.e., c("geneactiv", "actigraph")). If you do not specify, both are used.

wear_location

The location the device was warn. Can be either "wrist" (the default) or "hip" If the study has mixed wear locations, you need to run the function twice, once for each location.

overwrite

If the existing output should be replaced. FALSE by default.

verbose

Determines how much output the function returns. Useful for understanding what the package is doing. TRUE by default.

redo

For advanced usecases. If TRUE, the function will redo parts 2 through 5, assuming that part 1 has already been completed.

...

Pass additional parameters to GGIR::g.shell.GGIR(). Refer to the GGIR manual for details.

Details

The purpose of this function is to standardise the processing of the accelerometery files. As such, most of the arguments come preset and should not be modified. However, options which do not affect the output (e.g., the decision to process in parallel or not) are available via .... See GGIR::g.shell.GGIR() for details of these arguments.

You can specify parameters of your study by supplying ages, device, and/or wear_location (see Arguments for details). Not supplying these will cause sleepIPD to calculate every combination of thresholds (resulting in \(8^3 \times 2 = 1024\) output files). So, supplying them should slightly reduce processing time.

See also

Other processing functions: reprocess()