I wonder if anyone try to apply read.gt3x_ggir or read.gt3x while using GGIR. I would like to apply this in my codes, but I meet some problems. For example, I have 14 gt3x files, and I don't want to generate the csv files of them. In stead, I would like to read the gt3x directly and then use GGIR to process them to have part 1 milestone files. What should I do? The following codes are what I am using, but they are not working. It would be great if someone familiar about read.gt3x_ggir or read.gt3x in GGIR can help me with it. Thank you very much.
#=======================================================
#test to use the datadir_test to run the ggir, not working
outputdir="V:/test_gt3x/DL 12"
g.shell.GGIR(
mode=c(1),
datadir=X,
outputdir=outputdir,
studyname="Attempt1",
idloc=6,
f0=1,
f1=14,
print.filename=FALSE,
storefolderstructure = FALSE,
do.parallel=TRUE,
overwrite=FALSE,
#part 1#
windowsizes = c(5,900,3600),
do.anglez=TRUE,
chunksize = c(1),
printsummary=TRUE,
#part 2#
strategy = 2 , # this strategy gets rid of first data before first midnight and last midnight
includedaycrit = 16, M5L5res = 10, #already in default
winhr = 5,
qwindow=c(0,24),
qwindow_dateformat = "%d/%m/%Y",
qlevels = c(c(1380/1440),c(1410/1440)),
ilevels = c(0,36, 201, 707, 8000),
mvpathreshold = c(201),
boutcriter = 0.8,
bout.metric = 6 ,
epochvalues2csv=TRUE,
mvpadur=c(1,5,10),
iglevels = TRUE, #this function calculates intensity gradient
do.parallel = TRUE,
#part3#
timethreshold= c(5),
acc.metric="ENMO",
anglethreshold=5,
ignorenonwear = TRUE,
#part4#
#newly added codes with sleep log#
loglocation= "C:/Users/xzhu/Desktop/DL 12/sleep_log_v2.csv", #not working if using advanced file
def.noc.sleep=1,
colid=1,
coln1=4,
includenightcrit = 4,
outliers.only = TRUE,
relyonguider = FALSE,
sleeplogidnum = FALSE,
sleeplogsep=",",
criterror = 4,
do.visual = FALSE,
nnights = 30,
sleepwindowType = "SPT",
meta.sleep.folder = "C:/Users/xzhu/Desktop/DL 12/output_CSV_kid/meta/ms3.out",
#part 5#
threshold.lig = c(35.6),
threshold.mod = c(201.4),
threshold.vig = c(707.0),
#Hildebrand 2014 and 2016 intensity thresholds#
excludefirstlast = FALSE,
boutcriter = 0.8,
boutcriter.in = 0.9,
boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8,
boutdur.in = c(10),
boutdur.lig = c(1),
boutdur.mvpa = c(1),
timewindow = c("WW"),
do.report=c(2,4,5),
dofirstpage=TRUE,
visualreport=TRUE,
viewingwindow=1)
options(nwarnings = 10000)
warnings()