We met a problem regarding the duplicative dates for the same participant in part 5 cleaned day summary. The device 2261 used by the participant was not worn overnight from 05/23 to 05/24, leading to 2 wake times on 05/23 as shown in the report (Report_2261). Eventually, it caused duplicative rows with two calendar dates of 05/25 in part 5 cleaned day summary. We think one of the rows should belong to 05/24 based on what was shown in L5TIME and M5TIME. We need to merge other data by dates in our analysis so duplicative dates are concerning. We wonder why GGIR gives duplicative calendar dates for those days and how can we fix this issue in GGIR codes. We attached processing codes and part 1 milestone for 2261 below. It would be great if anyone could help us with it.
library(GGIR)
datadir="V:/ACOI/R01 - Voucher/....../ACC_all"
outputdir="D:/....../GGIR_output_kid"
g.shell.GGIR(
mode=c(1:5),
datadir=datadir,
outputdir=outputdir,
studyname="Attempt1",
idloc=6,
f0=1,
f1=279,
print.filename=FALSE,
storefolderstructure = FALSE,
do.parallel=TRUE,
overwrite=TRUE,
#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#
def.noc.sleep=1,
includenightcrit = 4,
outliers.only = TRUE,
relyonguider = FALSE,
criterror = 4,
do.visual = FALSE,
nnights = 30,
#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)