In the frame date below, I want the days that have no gain information to be repeated based on the last information collected. For example from day 2 to day 15 the gain will be 0.97 and day 79 to 86 of 0.45 How can I do this in R?
Dia Ganho
2 0.97
16 0.95
23 1.03
24 0.99
30 1.03
37 1.01
44 1.11
51 1.04
58 1.31
65 1.17
72 1.09
79 0.45
86