Missing the content of "visualisation_sleep.pdf"

64 views
Skip to first unread message

Chan Chan

unread,
Aug 3, 2022, 2:48:12 AM8/3/22
to R package GGIR
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))



7E00B289-9B8C-4889-842A-BFED7E696D04.png

Vincent van Hees

unread,
Aug 10, 2022, 8:07:16 AM8/10/22
to Chan Chan, R package GGIR
Hi Chan,

See:

and in particular the outliers.only argument. You will need to set that to FALSE if you want all nights to be plotted.

Cheers,

Vincent


Dr. Vincent van Hees | Independent consultant | https://accelting.com/
image

------- Original Message -------
--
You received this message because you are subscribed to the Google Groups "R package GGIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to RpackageGGIR...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/RpackageGGIR/2b28b4a3-d458-4adb-9242-54e2eb436ef1n%40googlegroups.com.

Chan Chan

unread,
Sep 19, 2023, 4:35:19 AM9/19/23
to R package GGIR
Dear Vincet,
  I updated the package version to 2.10-1. And I changed my code based on the GGIR pdf. But  "visualisation_sleep" was still blank, even if I wrote "outliers.only = TRUE". Can you help me to found out what's wrong?
Here is my code:
## Not run:
mode = c(1,2,3,4,5)
datadir = "G:/mystudy/mydata/HQN004.0_XIEQING_0W.csv"
outputdir = "G:/results"
studyname ="HQN04_0W"

f0 = 1
f1 = 2
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,
     ndayswindow = 7,
     hrs.del.start = 1,
     hrs.del.end = 1,

     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 = "G:/mystudy/sleepdiary/sleeplogN04.csv",
     outliers.only = FALSE,

     criterror = 4,
     relyonsleeplog = FALSE,
     colid = 1,
     coln1 = 2,
     do.visual = TRUE,
     #-------------------------------

     # 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),
     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"),
     #-----------------------------------
     # Report generation
     #-------------------------------
     do.report = c(2,4,5))

Vincent van Hees 在 2022年8月10日 星期三晚上8:07:16 [UTC+8] 的信中寫道:

Chan Chan

unread,
Sep 19, 2023, 5:59:04 AM9/19/23
to R package GGIR
I found the what's wrong with my data processing, and the problem was solved! It's because the sleeplog ID was inconsistent with the data ID, so GGIR didn't use sleeplog to calculate my data.

Chan Chan 在 2023年9月19日 星期二下午4:35:19 [UTC+8] 的信中寫道:

Vincent van Hees

unread,
Sep 22, 2023, 12:35:58 PM9/22/23
to Chan Chan, R package GGIR
Good to hear you figured it out and thanks for letting me know

Vincent
------- Original Message -------
Reply all
Reply to author
Forward
0 new messages