in R i have a data frame "closeValues" it is as follows
>closeValues
date value
1 1980-12-10 5
2 1980-12-15 8
3 1980-12-18 7
4 1980-12-20 1
but i need to fill the value for the field "value" with previous value if the "date" is missing. Actually i need the following output
>closeValues
date value
1 1980-12-10 5
2 1980-12-11 5
3 1980-12-12 5
4 1980-12-13 5
5 1980-12-14 5
6 1980-12-15 8
7 1980-12-16 8
8 1980-12-17 8
9 1980-12-18 7
10 1980-12-19 7
11 1980-12-20 1
is it possible in R?