Hi Vincent,
I'm using GGIR to process my actigraphy data. All went well except that "visualisation_sleep" was blank(see the attached image). However, I got the final report pdf. I don't know where was wrong. It will be very helpful if you can give me some advice. Thanks a lot.
Here is my code:
## Not run:
library(GGIR)
mode= c(1,2,3,4,5)
datadir= "C:/mystudy/mydata/HQN004_0W.csv"
outputdir= "D:/myresults"
studyname="test"
f0 = 1
f1 = 2
g.shell.GGIR(#-------------------------------
# General parameters
#-------------------------------
mode=mode,
datadir=datadir,
outputdir=outputdir,
studyname=studyname,
f0=f0,
f1=f1,
overwrite = FALSE,
do.imp=TRUE,
idloc=1,
print.filename=FALSE,
storefolderstructure = FALSE,
#-------------------------------
# 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 = 1,
hrs.del.start = 0,
hrs.del.end = 0,
maxdur = 14,
includedaycrit = 16,
L5M5window = c(0,24),
M5L5res = 10,
winhr = c(5,10),
qlevels = c(c(1380/1440),c(1410/1440)),
qwindow=c(0,24),
ilevels = c(seq(0,400,by=50),8000),
mvpathreshold =c(100,120),
#-------------------------------
# Part 3 parameters:
#-------------------------------
timethreshold= c(5,10),
anglethreshold=5,
ignorenonwear = TRUE,
#-------------------------------
# Part 4 parameters:
#-------------------------------
excludefirstlast = FALSE,
includenightcrit = 16,
def.noc.sleep = 1,
loglocation= "D:/sleeplog4.csv",
outliers.only = TRUE,
criterror = 4,
relyonsleeplog = FALSE,
sleeplogidnum = FALSE,
colid=1,
coln1=2,
do.visual = TRUE,
nnights = 14,
#-------------------------------
# Part 5 parameters:
#-------------------------------
# Key functions: Merging physical activity with sleep analyses
threshold.lig = c(30,40,50),
threshold.mod = c(100,120),
threshold.vig = c(400,500),
excludefirstlast = FALSE,
boutcriter = 0.8,
boutcriter.in = 0.9,
boutcriter.lig = 0.8,
boutcriter.mvpa = 0.8,
boutdur.in = c(10,20,30),
boutdur.lig = c(1,5,10),
boutdur.mvpa = c(1,5,10),
timewindow = c("WW"),
visualreport = TRUE,
#-----------------------------------
# Report generation
#-------------------------------
do.report=c(2,4,5))