[GGIR] error in part 4

443 views
Skip to first unread message

Gul Satar Ali

unread,
Apr 11, 2021, 10:20:17 PM4/11/21
to Rpacka...@googlegroups.com
Hi everyone and thanks to Vincent van Hees for the hard work on GGIR,
I'm a sleep researcher currently at Yuan Ze University Taiwan. My aim is to analyze the GENEActive raw accelerometer data "attached the bin file it's around seven hundred MB " ( https://drive.google.com/drive/folders/1_bKaFgli7RuHW2AgOMsEILAd9W0fryGn?usp=sharing) using GGIR. I have 7 days of datasets which I want to analyze  after the process the accelerometers successfully in part 1, 2, and 3, I have an error in part 4 says that ( and also screenshot attached below),
______________________________________________________________________________
Part 4
 1Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
  cannot open compressed file 'C:/Users/gulsa/Documents/R/GGIR/output_New folder/meta/ms3.out/NA', probable reason 'No such file or directory'
_______________________________________________________________________________
 
which lead to the failure to process part 4. I wonder if anyone knows how to solve the problem.

I have used with g.shell.GGIR as shown below:

library(GGIR)
 
mode= c(1,2,3,4)
datadir= "C:/Users/gulsa/Documents/R/GGIR/New folder"
outputdir= "C:/Users/gulsa/Documents/R/GGIR"
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,
  ndayswindow=7,
  hrs.del.start = 1,
  hrs.del.end = 1,
  maxdur = 9,
  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= "C:/Users/david/Documents/R/Ali/sleeplog.csv",
  outliers.only = FALSE,
  criterror = 4,
  relyonsleeplog = FALSE,
  sleeplogidnum = TRUE,
  colid=1,
  coln1=2,
  do.visual = TRUE,
  nnights = 9,
  #-------------------------------
  # 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"),
  #-----------------------------------
  # Report generation
  #-------------------------------
  do.report=c(2,4,5))


Thank you,
Ali

GGIR error.PNG

Vincent van Hees

unread,
Apr 25, 2021, 8:43:54 AM4/25/21
to Gul Satar Ali, Rpacka...@googlegroups.com
Hi Ali,

I am able to process your file with all GGIR parts based on the command you shared.

Note that the file does not have an ID number in the header or in the filename as can be seen in part 2 csv report. This will complicate linking the data with your sleeplog.

So, first make sure the ID is correctly extracted. For example, by putting the ID number in the file name before the first underscore and changing idloc to idloc=2. Secondly, check that the ID number as extracted by part2 matches the ID number format in your sleeplog.

If this does not resolve your problem, please share full GGIR console output, you only shared a print screen of the message in red, not the other output above it.

Thanks,

Vincent

Dr. Vincent van Hees
Independent consultant

ACCELTING.png



‐‐‐‐‐‐‐ 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.

Charles Lucena

unread,
Jul 21, 2023, 2:46:34 AM7/21/23
to R package GGIR
Hi all,

Did you solve your problem?
Unfortunately, my data analyses presented the same problem. Please, have a look below. 
 Part 4
 1Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
  cannot open compressed file 'D:/Coortes Pelotas Dropbox/Acelerometria Epidemiologia/Acelerometria/Coorte 1982/Lotes - Acompanhamento dos 40 anos/Lote 1 - completo/Results/output_Lote 1 - csv/meta/ms3.out/NA', probable reason 'No such file or directory'

Could you help me, please?
Reply all
Reply to author
Forward
0 new messages