afterggir: Main Call for Data Processing after Runing GGIR for...

Description Usage Arguments Value

View source: R/part0_maincall.R

Description

This R script will generate all necessary R/Rmd/shell files for data processing after running GGIR for accelerometer data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
afterggir(
  mode,
  useIDs.FN = NULL,
  currentdir,
  studyname,
  bindir = NULL,
  outputdir,
  epochIn = 5,
  epochOut = 5,
  flag.epochOut = 60,
  log.multiplier = 9250,
  use.cluster = TRUE,
  QCdays.alpha = 7,
  QChours.alpha = 16,
  QCnights.feature.alpha = c(0, 0),
  Rversion = "R",
  filename2id = NULL,
  PA.threshold = c(50, 100, 400),
  desiredtz = "US/Eastern",
  RemoveDaySleeper = FALSE,
  part5FN = "WW_L50M100V400_T5A5",
  NfileEachBundle = 20,
  trace = FALSE
)

Arguments

mode

number Specify which of the five parts need to be run, e.g. mode = 0 makes that all R/Rmd/sh files are generated for other parts. When mode = 1, all csv files in the GGIR output directory were read, transformed and then merged. When mode = 2, the GGIR output files were checked and summarized in one excel sheet. When mode = 3, the merged data was cleaned according to the number of valid hours on each night and the number of valid days for each subject. When mode = 4, the cleaned data was imputed.

useIDs.FN

character Filename with or without directory for sample information in CSV format, which including "filename" and "duplicate" in the headlines at least. If duplicate="remove", the accelerometer files will not be used in the data analysis of part 5-7. Defaut is NULL, which makes all accelerometer files will be used in part 5-7.

currentdir

character Directory where the output needs to be stored. Note that this directory must exist.

studyname

character Specify the study name that used in the output file names

bindir

character Directory where the accelerometer files are stored or list

outputdir

character Directory where the GGIR output was stored.

epochIn

number Epoch size to which acceleration was averaged (seconds) in GGIR output. Defaut is 5 seconds.

epochOut

number Epoch size to which acceleration was averaged (seconds) in part1. Defaut is 5 seconds.

flag.epochOut

number Epoch size to which acceleration was averaged (seconds) in part 3. Defaut is 60 seconds.

log.multiplier

number The coefficient used in the log transformation of the ENMO data, i.e. log( log.multiplier * ENMO + 1), which have been used in part 5-7. Defaut is 9250.

use.cluster

logical Specify if part1 will be done by parallel computing. Default is TRUE, and the CSV file in GGIR output will be merged for every 20 files first, and then combined for all.

QCdays.alpha

number Minimum required number of valid days in subject specific analysis as a quality control step in part2. Default is 7 days.

QChours.alpha

number Minimum required number of valid hours in day specific analysis as a quality control step in part2. Default is 16 hours.

QCnights.feature.alpha

number Minimum required number of valid nights in day specific mean and SD analysis as a quality control step in the JIVE analysis. Default is c(0,0), i.e. no additional data cleaning in this step.

Rversion

character R version, eg. "R/3.6.3". Default is "R".

filename2id

R function User defined function for converting filename to sample IDs. Default is NULL.

PA.threshold

number Threshold for light, moderate and vigorous physical activity. Default is c(50,100,400).

desiredtz

charcter desired timezone: see also http://en.wikipedia.org/wiki/Zone.tab. Used in g.inspectfile(). Default is "US/Eastern". Used in g.inspectfile() function to inspect acceleromether file for brand, sample frequency in part 2.

RemoveDaySleeper

logical Specify if the daysleeper nights are removed from the calculation of number of valid days for each subject. Default is FALSE.

part5FN

character Specify which output is used in the GGIR part5 results. Defaut is "WW_L50M100V400_T5A5", which means that part5_daysummary_WW_L50M100V400_T5A5.csv and part5_personsummary_WW_L50M100V400_T5A5.csv are used in the analysis.

NfileEachBundle

number Number of files in each bundle when the csv data were read and processed in a cluster. Default is 20.

trace

logical Specify if the intermediate results is printed when the function was executed. Default is FALSE.

Value

See postGGIR manual for details.


postGGIR documentation built on Jan. 6, 2022, 5:08 p.m.