I'm a beginner in accelerometer data analysis and trying to solve the problem of data merging.
We used Actigraph GT3X-BT for 21 days data collection. Due to a force majeure factor (data memory), we performed data collection again after exporting the data on day 7.
Using AGD files can merge files of two time periods (part1 and part3), but GGIR cannot read files in AGD format.
In order to solve this problem, we converted the gt3x file to csv. And according to what we know about the intermediate blank time, a csv (part2) file is created artificially. And then the three csv files are merged (part1 + part2 + part3). The file runs smoothly in GGIR, but the timing is not recognized as we planned.
We want to know how the GGIR package identifies the Start Time when reading the csv file?
Is it Start Time in the first 10 lines of information? If the time of part1 and part2 overlap, can part2 cover part1?
We boldly tried a solution, but we don't know if this is the right way? If it is wrong, can you point out our mistakes?
Finally, We would like to konw, is there a way in GGIR to solve the problem of merging gt3x files?
Please forgive me if I ask any stupid question.
library(GGIR)
GGIR(
rmc.firstrow.header=c(11),
rmc.header.length = c(),
rmc.col.acc = 2:4, rmc.col.temp = c(),
rmc.col.time= c(1),
rmc.unit.acc = "g", rmc.unit.temp = "C",
rmc.unit.time = "POSIX",
rmc.format.time = "%Y-%m-%d %H:%M:%OS",
rmc.bitrate = c(), rmc.dynamic_range = c(),
rmc.unsignedbit = TRUE,
rmc.origin = "1970-01-01",
rmc.desiredtz = "Asia/Shanghai",
rmc.sf = 30,
rmc.headername.sf = c(),
rmc.headername.sn = c(),
rmc.headername.recordingid = c(),
rmc.header.structure = c(),
rmc.check4timegaps = FALSE,
rmc.col.wear = c(),
rmc.doresample=FALSE,
interpolationType=1,
mode = c(1,2,3,4,5),
datadir = "/Users/mydata",
outputdir = "/Users/myresults",
f0 = 1,
f1 = 2,
#-------------------------------
# Part 1 parameters:
#-------------------------------
windowsizes = c(5,900,3600),
do.cal=TRUE,
do.enmo = TRUE,
do.anglez=TRUE,
chunksize=1,
printsummary=TRUE,
#-------------------------------
# Part 2 parameters:
#-------------------------------
strategy = 2,
hrs.del.start = 0,
hrs.del.end = 0,
maxdur = 21,
includedaycrit = 10,
qwindow=c(0,8,21,24),
mvpathreshold =c(100),
bout.metric = 5,
#-------------------------------
# Part 3 parameters:
#-------------------------------
timethreshold= c(5),
anglethreshold=5,
ignorenonwear = TRUE,
do.part3.pdf=TRUE,
#-------------------------------
# Part 4 parameters:
#-------------------------------
excludefirstlast = FALSE,
includenightcrit = 10,
def.noc.sleep = 1,
#loglocation= "/Users/shuwen/myresults/sleeplog.csv",
outliers.only = FALSE,
criterror = 4,
relyonsleeplog = FALSE,
sleeplogidnum = FALSE,
colid=1,
coln1=2,
do.visual = TRUE,
nnights = 21,
#-------------------------------
# Part 5 parameters:
#-------------------------------
# Key functions: Merging physical activity with sleep analyses
do.ENMO = TRUE,
acc.metric="ENMO",
threshold.lig = c(30),
threshold.mod = c(100),
threshold.vig = c(400),
excludefirstlast = FALSE,
boutcriter = 0.8,
boutcriter.in = 0.9,
boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8,
boutdur.in = c(1,10,30),
boutdur.lig = c(1,10),
boutdur.mvpa = c(1),
timewindow = c("WW"),
includedaycrit.part5 = 2/3,
#-----------------------------------
# Report generation
#-------------------------------
visualreport=TRUE,
dofirstpage=TRUE
)