.cwa files error (Error in data[, temperaturecolumn] : subscript out of bounds)

60 views
Skip to first unread message

Abdul Haleem Butt

unread,
Nov 21, 2023, 1:18:19 PM11/21/23
to R package GGIR
Hi all, 

Facing a problem while processing a cwa file, the temperature column is out of bounds, I've attached my recorded file if one can try to see the problem.

error is while loading chunk in function g.calibrate: even set Temprature= FALSE, does not work. It is 7 days of recording. the one thing I did and probably created the problem, was stop data recording three hours before the time I set on the device, which may created a problem

image.png


 library(GGIR)
    GGIR(mode=c(1,2,3,4,5),
    datadir="abdul_NOV",
    outputdir="vignettes",
    desiredtz = "Europe/Brussels",
    do.report=c(2,4,5),
    overwrite = TRUE,
    do.imp=FALSE,
    do.parallel = FALSE,
    idloc=1,
    print.filename=FALSE,
    storefolderstructure = FALSE,
    #=====================
    # Part 1
    #=====================
    do.cal=TRUE,
    sensor.locationCharacter = "wrist",
    use.temperature=TRUE,
    windowsizes = c(5,900,3600),
    do.enmo=TRUE,
    acc.metric="ENMO",
    do.anglex=FALSE,
    do.anglez=TRUE,
    do.angley=TRUE,
    #do.neishabouricounts = TRUE,  
  
    chunksize=1,
    printsummary=TRUE,
    epochvalues2csv=TRUE,
    minimum_MM_length.part5 = 24,
   
 
Kind Regards, 

Abdul Haleem 



Jairo Hidalgo Migueles

unread,
Nov 22, 2023, 6:20:20 AM11/22/23
to R package GGIR
Hi,

I processed your file with no issues. The only thing I changed in your script is the argument  sensor.locationCharacter = "wrist", which does not exist in GGIR, I used  sensor.location = "wrist" (which is default setting).

Additionally, make sure your directory containing this file ("abdul_NOV") does only contain accelerometer raw data files (in your case, *.cwa files). It might be that GGIR is trying to load a file containing something different to accelerometer data.

Best,
Jairo

Abdul Haleem Butt

unread,
Nov 22, 2023, 6:44:55 AM11/22/23
to Jairo Hidalgo Migueles, R package GGIR
Dear Jairo, 

really appricated for your feedback. I am facing the same problem so far, even removing the wrist location as suggested. could you please share the results with me the file obtained in part 5 (ms5.outraw) and the visual report (file summary reports)? really appreciate your help. 


Kind Regards, 

Abdul Haleem 

--
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/2cc4a8e2-a999-4e6c-a02d-a3fd0ce33886n%40googlegroups.com.

Vincent van Hees

unread,
Nov 22, 2023, 9:41:55 AM11/22/23
to Abdul Haleem Butt, Jairo Hidalgo Migueles, R package GGIR

 could you please share the results with me ...

Please reply to Jairo's suggestion that you may have other data files in your data directory.
Also, do this in a new output directory to avoid previous affecting your new output. If you still get the error build a minimally reproducible example. For example, tell us which GGIR call does cause the error and which call does not cause the error.

All works fine, if I do:
GGIR(mode = c(1, 2),
     datadir = datadir,
     idloc = 1,
     outputdir = outputdir,
     do.report = c(2))

This google group is not a data processing service, but intended to help investigate and resolve issues GGIR questions/issues. Only then there is a chance that users like you can learn to use GGIR without help.

Thanks,

Vincent

Abdul Haleem Butt

unread,
Nov 22, 2023, 10:15:16 AM11/22/23
to Vincent van Hees, Jairo Hidalgo Migueles, R package GGIR
there is no other file in the data directory, I can see there is an error in the part1 where GGIR is not able to read the file with 

image.png
image.png

Vincent van Hees

unread,
Nov 22, 2023, 11:15:08 AM11/22/23
to Abdul Haleem Butt, Jairo Hidalgo Migueles, R package GGIR
Please read my email and respond to all suggestions. Providing reproducible examples is critical if you want help. 

Thanks,

Vincent

Jairo Hidalgo Migueles

unread,
Nov 23, 2023, 5:15:43 AM11/23/23
to R package GGIR
It would help if you share your config.csv file, you would find it in your output folder.

Best,
Jairo

Abdul Haleem Butt

unread,
Dec 1, 2023, 9:36:22 AM12/1/23
to R package GGIR
Hi Jairo, 

thanks for your feedback, actually I was unable to resolve the issue with my previous recording and recorded another 5 days with Axivity Ax6, and it is working fine now. 

Kind Regards, 

Abdul Haleem 
Reply all
Reply to author
Forward
0 new messages