Part 4 - Error in round(S[j, colid])

99 views
Skip to first unread message

Natascja Di Cristofaro

unread,
Apr 23, 2021, 2:54:17 PM4/23/21
to R package GGIR
Hello, 
I'm running analysis on non 24-hour wear files (participants only wear the device during waking hours) and using a guider. I'm getting the following error:

Error in round(S[j, colid]) : 
  non-numeric argument to mathematical function

Has anyone else encountered this? I've attached the code I'm running. Is this error because something I've written in my code or in the guider?

Thanks, 
Natascja 
code.docx

Vincent van Hees

unread,
Apr 25, 2021, 9:30:32 AM4/25/21
to Natascja Di Cristofaro, R package GGIR
Hi Natascja,

This indicates that there may be an issues with the ID number in the sleeplog.

Please check that:
- Argument colid is correctly specified
- ID numbers as stored in the part 2 report match the format of the ID numbers in your sleeplog (file specified with loglocation).

What also helps to investigate this is trying to run GGIR function g.loadlog with you sleeplog first. This would allow you to check that the sleeplog is correctly formatted.

Best, 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.

Natascja Di Cristofaro

unread,
Apr 30, 2021, 4:02:18 PM4/30/21
to R package GGIR
Hi Vincent, 
Thanks for your response, I realized I had sleeplogidnum=TRUE whereas my participant ID's include characters and not just number. I've changed to sleeplogidnum=FALSE, and it ran perfectly. 

I have a further question about sleep logs, is there a way to use the sleep log for daytime naps or device removal? 
Thanks, 
Natascja

Vincent van Hees

unread,
May 3, 2021, 3:53:07 AM5/3/21
to Natascja Di Cristofaro, R package GGIR
Hi Natascja,

Great to hear you managed to resolve the issue.

Using sleep log for daytime naps or device removal is not possible at the moment. In the upcoming months I plan to enhance the code such that it can export the estimates sustained inactivity bouts as a candidate list of 'naps'.  This is not what you need, but it could be a first step towards fusing in nap-diary and nonwear-diary information. If you are interested in supporting this development with your own time and/or financially to pay for my time then let me know and we can chat about this.

Thanks,

Vincent

Dr. Vincent van Hees
Independent consultant

ACCELTING.png



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

Reply all
Reply to author
Forward
0 new messages