Most of the time the hourly rainfall is zero (0), this are not in the file. How can I create a complete time series with all 8,784 hours in the year. That is, add the hours with zero rainfall.
rainfall$V1 <- as.POSIXct(paste0(rainfall$V1), format = "%d%b%y:%H:%M")
head(rainfall)
Eg. 1992-01-01 01:00:00 ... 1992-01-16 13:00:00 1992-01-16 17:00:00 is missing from the file, as they have zero rainfall.
V1 is the Date (hourly) V2 is the hourly rainfall
and here is my ts():
rainfall_ts <- ts(rainfall$V2, start= c(1992,01,01), frequency = 24*365)
and I need to plot the rainfall_ts, is the frequency = 24*365 correct?
thank you