I have currently looked at imputeTS and zoo packages but it does not see to work Current data is..
group/timeseries(character)
1 2017-05-17 04:00:00
1 2017-05-17 04:01:00
1 NA
1 NA
1 2017-05-17 05:00:00
1 2017-05-17 06:00:00
2 NA
2 2017-05-17 04:31:00
2 NA
2 NA
2 NA
2 2017-05-17 05:31:00
I would like to fill in NA with the interpolation time series so that the time is the mid point of the row before and after. Also, i have to point out that each time series belongs to a group. Meaning the time resets for each group.
I will provide a picture of the actual data to be more clear
Thanks for the help in advance!