Part4 defaultSptOnset error involved with daylight saving time

81 views
Skip to first unread message

Leticia Sewaybricker

unread,
May 1, 2024, 4:39:54 PMMay 1
to R package GGIR

Hi all, I have been working on an error in Part4 that has been shared in a past conversation (https://groups.google.com/g/rpackageggir/c/0fTzh9tr2vU/m/D57_TV_HAAAJ). I am using data actigraph (gt3x file). waist wearing, day and night, for 7 days. For 2 participants I am getting the error below

Part 4 1Error in if (is.na(defaultSptOnset) == TRUE) { : argument is of length zero

After lots of trials, I was able to narrow down the source - both participants had NOV/06/2022 as a “problematic date” – and it was when daylight savings ended that year. Device configuration and data collection happened in the same time zone. During my trials, I was able to successfully run GGIR if I set the study end date for NOV/05/2022. However, I really would like to use the data coming from 11/06/2022, as well as the following days.

I am using GGIR version 3.0.9.

Please, find attached: meta file from one participant, graphperday pdf, sleeplog RData, and the config file.

Any ideas or suggestions are very much appreciated. Happy to share further info, if needed. Thank you!

Leticia



sleeplog.RData
graphperday_id_BEA148V1_BEA148V1.gt3x.pdf
meta_BEA148V1.gt3x.RData
config_beam.csv

Vincent van Hees

unread,
May 20, 2024, 11:38:57 AMMay 20
to Leticia Sewaybricker, R package GGIR
Hi Leticia,

The sleeplog.RData file is not helpful to reproduce the error. I would need the actual sleep log csv-file. I just processed the file without sleeplog and that went well, so it sounds like the issue is specific to using the sleeplog.

Best,

Vincent

--
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/d1ec15a2-1d01-4723-974d-baaca115eb57n%40googlegroups.com.

Leticia Sewaybricker

unread,
May 20, 2024, 11:52:16 AMMay 20
to R package GGIR
Thank you, Vincent.
Please, find attached the sleep log csv file.
I appreciate you investigating further.
Best,
Leticia
beam_sleeplog_simple.csv

Vincent van Hees

unread,
May 20, 2024, 12:13:32 PMMay 20
to Leticia Sewaybricker, R package GGIR
Thanks, I have now re-run the code with your sleeplog:

GGIR(outputdir = "",
     mode = 2:4,
     overwrite =TRUE,
     loglocation = "beam_sleeplog_simple.csv",
     datadir = "test")

This does not cause the issue as you can in the attached output file. However when I add argument configfile = "config_beam.csv" to integrate all your argument settings I do get the error you got.

So, it seems one or multiple of your input argument trigger the error. Figuring out which one it is a bit time consuming. Would you mind doing this and reporting back?

So, first run GGIR with all its defaults as I have done above and then iteratively add your own argument values. Make sure you delete config.csv before you start as otherwise you directly use all your old argument values.

Thanks,
Vincent
part4_nightsummary_sleep_cleaned.csv

Leticia Sewaybricker

unread,
May 20, 2024, 12:23:58 PMMay 20
to R package GGIR
Sounds good, Vincent.
I will tackle it and report back.
Thank you!
Leticia

Leticia Sewaybricker

unread,
May 20, 2024, 7:16:09 PMMay 20
to R package GGIR
Hi again,

Vincent - do you have any suggestions for me as I still get the same error in Part4 
Part 4 1Error in if (is.na(defaultSptOnset) == TRUE) { : argument is of length zero

although running the bare minimum. I have tried 2 options

Option 1 - with original gt3x file
GGIR(datadir= "C:/Users/...",
outputdir= "C:/Users/...")

Option 2 - with metadata file I have shared in the initial email (on May 1st)
GGIR(outputdir="C:/Users/...",
     mode = c(2,3,4),
     overwrite =TRUE,
     datadir="C:/Users/l...")

I have uninstalled and reinstalled R, RStudio and GGIR. So, currently using  GGIR version 3.1.0

Any ideas on other potential tests are appreciated.

Best wishes,

Leticia

Vincent van Hees

unread,
May 21, 2024, 10:56:37 AMMay 21
to Leticia Sewaybricker, R package GGIR
Did you remove the config.csv file as I indicated?  (inside the output folder). This is critical for it to work because otherwise you keep on using the old argument values.

Vincent 

Leticia Sewaybricker

unread,
May 21, 2024, 11:44:04 AMMay 21
to R package GGIR
Thank you for double checking. Yes, I confirm that config.csv file was deleted.

Vincent van Hees

unread,
May 21, 2024, 1:38:17 PMMay 21
to Leticia Sewaybricker, R package GGIR
Sorry, I meant:

GGIR(outputdir = outputdir,
     mode = 2:4,
     overwrite = TRUE,
     loglocation = "beam_sleeplog_simple.csv",
     configfile = c(),
     datadir = datadir)

works for me, so it is important to also set configfile = c() to make sure GGIR does not use the configfile from a previous run.

I do get the error once I specify configfile to be the file you shared. This to me indicates that it is your set of arguments that triggers the error.

Vincent

Leticia Sewaybricker

unread,
May 31, 2024, 12:14:50 PMMay 31
to R package GGIR

Hi Vincent and GGIR community,

 

Vincent, I keep getting the same error message in Part 4, every single time.

 

Part 4 1Error in if (is.na(defaultSptOnset) == TRUE) { : argument is of length zero

 

I have updated to GGIR v. 3.1.0 and performed several tests, including trying to mimic exactly what you are running (metadata file and script).

 

GGIR(outputdir = outputdir,

     mode = 2:4,

     overwrite = TRUE,

     loglocation = "beam_sleeplog_simple.csv",

     configfile = c(),

     datadir = datadir)

 

I have tried it with and without the sleep log. I have tried with another computer, naive to any data processing. All the same error.


Do you have any hypothesis of what could be different? 

Do think it could be a time zone thing?

I am still intrigued that, in the past, I was able to narrow down the source - NOV/06/2022 as a “problematic date” – and it was when daylight savings ended that year. Device configuration and data collection happened in the same time zone. During my trials, I was able to successfully run GGIR if I set the study end date for NOV/05/2022, even including my config file.

 

Any thoughts, I am happy to try out.

Thank you,

Leticia

Reply all
Reply to author
Forward
0 new messages