I have a data frame and I need to dis-aggregate it over different years. The data frame is:
df = data.frame(x = 1000, time_L = '2018-12-30', time_R = "2020-10-30")
and I need the output to be like this:
time_L time_R diff xprime
2018-12-30 2018-12-31 2 3
2019-01-01 2019-12-31 365 544
2020-01-01 2020-10-30 304 453
xprime is dis-aggregated over each time interval based on the number of days in it.
Thanks in advance.