I would like to add all missing dates between min and max date in a data.frame and linear interpolate all missing values, like
data.frame
df <- data.fra
Another nice and short solution (using imputeTS):
library(imputeTS) x <- zoo(df$value,df$date) x <- na.interpolation(x, option = "linear") print(x)