Thanks Marcus and Vincent,
Apart from Vincent's input, I think you still have an issue with the time resolution. Defining qwindow as decimal numbers when you need a high precision in the minutes bring this problem.
For example, using your method and converting back the data to timestamps, you can see we don't get exactly the timestamps we expect:
library(lubridate)
seg_timestamp <- c(
"07:00", "08:00", "08:55", "09:50",
"10:10", "11:05", "12:00", "12:30",
"13:00", "13:30", "14:25", "15:20",
"15:40", "16:35", "17:30", "18:30",
"23:00")
seg_hours = period_to_seconds(hm(seg_timestamp))/3600
print(seg_hours)
back_conversion = seconds_to_period(seg_hours*3600)
print(back_conversion)
[1] "7H 0M 0S" "8H 0M 0S"
[3] "8H 54M 59.9999999999964S" "9H 50M 0S"
[5] "10H 10M 0S" "11H 5M 0S"
[7] "12H 0M 0S" "12H 30M 0S"
[9] "13H 0M 0S" "13H 30M 0S"
[11] "14H 25M 0S" "15H 20M 0S"
[13] "15H 40M 0S" "16H 34M 59.9999999999927S"
[15] "17H 30M 0S" "18H 30M 0S"
[17] "23H 0M 0S"
The reason it works in part 2 is that there we already implemented a check in the past a check for the time resolution and we use the closest epoch in the case that the resolution between epoch length and qwindow does not match. However I think this is not implemented in part 5 yet as this functionality is way more recent.
As a quick solution for you, I would quickly build up an activity log and use the path to the activity log as input for the qwindow argument, I think GGIR will then be able to handle those timestamps. The activity log should look like this:
ID t1 t2 t3 t4 t5 t6 ......
ID01 07:00:00 08:00:00 08:55:00 09:50:00 10:10:00 11:05:00
ID02 07:00:00 08:00:00 08:55:00 09:50:00 10:10:00 11:05:00
ID03 07:00:00 08:00:00 08:55:00 09:50:00 10:10:00 11:05:00
ID04 07:00:00 08:00:00 08:55:00 09:50:00 10:10:00 11:05:00
.....
Best,
Jairo