Hi all,
I am trying to include a sleep log in my analyses to help identify non-wear times and did a trial test with just one participant. We have data on GT3X accelerometers that were worn on the hip for 7 days.
When I ran my script I received this warning message and didn't get any output:
Part 4
1Error in x[[jj]][iseq] <- vjj : replacement has length zero
In addition: Warning messages:
1: In min(as.numeric(sleeplog$night)) :
no non-missing arguments to min; returning Inf
2: In max(as.numeric(sleeplog$night)) :
no non-missing arguments to max; returning -Inf
I am not sure why this message appears. I am using GGIR version 3.2-0.
I also tried to run the script where I removed any blank cells in the sleep log (participants have multiple time points in the day where they took off the accelerometer so there are multiple nonwear_off/on columns) and got the same warning message.
Attached is my script, the sleep log file and the R basic/meta file.
Any help would be greatly appreciated,
Many thanks
Callum