I have a data of uneven time intervals like this.
x=data.frame(date=rep('2014-07-24',5),from=c("14:12","14:12","14:30","14:24","14:32"),to=c("15:25","15:40","15:35","15:50","15:55"),Load=c(2,2,1,1,1))
the 'from' and 'to' columns represent the start and end time for corresponding fluctuation in load for that time interval. I want to convert this data into 15 minutes interval (96 blocks) for corresponding dates. So if the interval 14:15-14:30 is present in that interval (from-to), it will be assigned that value of load. If it is present in another interval too, the value of load will be added further for this interval.
Is there any way in R through which I can compare if this interval 00:00-00:15 (and others) is present in uneven intervals like 12:40-13:45, so that I can accordingly arrange the data above like this.
y=data.frame(date=rep('2014-07-24'),block=c("14:15-14:30","14:30-14:45","14:45-15:00","15:00-15:15","15:15-15:30"),load=c(4,7,7,7,7))
Please help. Thanks a lot