Error in part 4 deltadates>300

37 views
Skip to first unread message

Iris Willems

unread,
Apr 26, 2025, 9:01:06 AMApr 26
to R package GGIR

Hi GGIR team,

Thank you again for the fantastic R package you have developed.

I am currently processing data from three different timepoints separately. I have already successfully run the batch processing for timepoints 1 and 2. However, when I attempt to run the same script for the final batch (timepoint 3), I encounter an error. The error message indicates that the dates in my sleep log are more than 300 days apart from the recording dates in the data.

I have double-checked the dates in both the sleep log and the GT3X files, and they match correctly, so I’m unsure why this error persists. Could there be another reason why this is happening, even though the script and the other sleep logs worked without issues for timepoints 1 and 2?

Thank you for your help!

Iris 


Part 4 Error in if (deltadate > 300) { : missing value where TRUE/FALSE needed In addition: Warning message: Skipping sleeplog row for ID E004 H A12 because it has no date(s)




Vincent van Hees

unread,
May 1, 2025, 10:30:13 AMMay 1
to Iris Willems, R package GGIR
Hi Iris,

The message indicates to me the there is no dates for ID "E004 H A12".

Could you check:
  • Is this truly the ID for the individual?
  • Does this ID appear both in the part2 csv output and in the sleeplog? This is essential for GGIR to match accelerometer data with sleeplog.
  • We generally ignore spaces in ID names, based on the assumption that spaces are never used to encode who wore the accelerometer. In other words, we assume that "E004 H A12" must be the same person as "E004HA12".
  • Do all nights for that individual in the sleeplog have date?
  • Could it be that something went wrong in the formatting of the csv file. Excel does not always visualise well the actual date format inside the file. Consider opening with Eclipse (Mac) or Notepad (Windows) to inspect the real date format.

Best wishes,

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, visit https://groups.google.com/d/msgid/RpackageGGIR/a335d7ed-6b9e-4e18-a292-c111ceacd6c0n%40googlegroups.com.

Message has been deleted

Iris Willems

unread,
Jul 18, 2025, 7:20:52 AMJul 18
to R package GGIR
Hi Vincent,

Thank you for your answer. I double checked everything and I still cannot see where it goes wrong. 

I have renamed the ID to E004 to make it more simple but even now I still get the same error. All nights have a sleeplog date and I checked the date format in notepad which seems correct to me.

When I inspect the output I only get output in the meta folder for basic, ms2.out, ms3.out and for all other parts, the folders remains empty, even the results folder. Therefore I cannot check this option "Does this ID appear both in the part2 csv output and in the sleeplog".

Is there another option I can check to fix this :)?

Thank you for helping me out!!

Iris Willems




Op donderdag 1 mei 2025 om 16:30:13 UTC+2 schreef Vincent van Hees:
Reply all
Reply to author
Forward
0 new messages